You could use the after_theme_switch
hook to do this, and wp_safe_redirect()
works fine to redirect to local urls only. In your callback function check for the $_GET['activated']
flag or you may get a “too many redirects” type of error.
add_action( 'after_switch_theme', 'my_theme_redirect' );
function my_theme_redirect() {
if( isset( $_GET['activated'] ) ) {
wp_safe_redirect( admin_url('admin.php?page=alecaddd_sunset') );
exit;
}
}
Related Posts:
- Hook if somebody saves plugin options?
- Where can I find a schema of wordpress plugin core architecture?
- How to Loop Plugin Option Field Set?
- Save and retrieve custom plugin options value
- How should I use register_setting, add_settings_section, & add_settings_field in my plugin’s options page?
- Using tabs for wordpress plugin
- How to handel multiple checkbox field in the admin settings page with Settings API
- Custom plugin settings: clicking “save changes” does not display success message
- How can I include a setting that has a variable number of values in a settings page using register_setting?
- Saving Plugin settings to the database
- check for the current screen
- Plugin set default setting value when it activated
- Get page slug in Admin menu
- Stop the form of beign submitted on “Save changes” custom option page
- Add a Custom Permalink option in the Permalink Admin Screen?
- Settings API – input always updates over validation
- Wp die causing 500 Internal Server Error?
- Can’t get plugin settings page to save data
- Why this global array is returning NULL from a callback function
- How to get specific setting by settings_fields()?
- Most efficient way to use classes to create admin pages using Settings API
- Show admin notice on incorrect value on form field
- Cannot display settings field
- Checkbox conflict in my custom plugin admin page
- Bulk update all posts from plugin settings screen
- Change the display of Settings API (do_settings_sections)
- Settings API saved values not getting shown in the dropdownbox
- Can I use register_settings and unregister_setting once the settings page has loaded?
- Update WP option by plugin
- How to save plugin custom settings page fields
- How to change php variable value using wp setting api
- Settings API Message Error is global
- 500 error when updating plugin option
- How to make sure settings are not lost when plugin is updated?
- Editable select options in quick edit OR in plugin settings
- How to save Setting pages data to the database?
- update_option_{$option} not working (do function after options are saved)
- How do I render content from a wp_editor in a plugin setting field?
- Settings Fields not showing up in Submenu Page
- How to save the option’s new values plus old value without overwrite old one
- WordPress Boilerplate Plugin doesn’t see callback functions for add_settings_field and add_settings_section
- How do I add a textarea (multirow) option to my WordPress plugin?
- WordPress Settings – Custom Button actions
- Option page not updating multiple records in settings api
- WordPress 4.1 plugin only save 1 field to database
- Creating a register settings class that supports extended classes
- Unable to Retrieve Setting Value for my Plugin
- Validating values using Settings API?
- Extend my plugin settings with hooks
- How can I save a setting field with multiple checkbox options generated by a foreach loop on a custom wordpress admin page?
- move setting data from wordpress api to codestar freamwork
- is_plugin_active function doesn’t exist
- How to pass multiple values in shortcode?
- How do you auto-activate plugins from child themes
- How can I add a custom meta value on file upload?
- Check if the front end user is log in or not
- Woocommerce Shipping module available only for type of products [closed]
- Plugin jQuery version VS Theme jQuery version: search for best practice
- JQuery not working in my plugin [closed]
- Bulk edit existing shortcode within custom field
- Create dynamic page content from custom WordPress plugin page
- WooCommerce Custom Product to checkout
- How to simultaneously access the same MySQL database in the main column and sidebar of WordPress?
- Default WordPress WP Editor removing style tags and html tag
- Visual Composer shortcode for child theme dir
- Is W3 Total Cache supposed to delete the local files after they are uploaded to CDN? [closed]
- What does making sure “that your theme is WordPress header and footer tag enabled” mean?
- check if a file in a plugin folder exists from a locale installation
- WooCommerce: Disable Taxation for Specific Address [closed]
- Move plugin-settings to ‘Settings’-menu in the admin
- Installing wordpress on a subdomain of an already existing static website
- Slashes stripped in ACF
- How do I add some javascript validation to the admin interface form’s onsubmit?
- Hook for page Request?
- How to do database for download stats?
- Comment IP Plugin – Fixing onfocus=’this.select()’
- Displaying number of drafts in Posts section of admin sidebar [closed]
- Looking for a PayPal donation plugin similar to JoomDonation [closed]
- admin bar disappears completely in 2010 theme
- Show views count for pop up post
- How to use third-party SendGrid Email Validation API in Gravity Forms?
- Multiple CF7 Forms causing multiple recaptcha requests
- Product slider not showing when clicking on tabs
- Custom plugin issue – Notice: Trying to get property of non-object in
- jquery plugin won’t fire when hamburger class element clicked
- fetch price from different table woocommerce
- Permission Issues regarding Plugin updates & FTP transfers
- How to write wordpress plugins faster to load?
- mailjet plugin – extend functionnalities and reuse api
- Using permalinks with parameters
- Put folder in theme via plugin
- How to manually remove preload fonts settings in WordPress?
- How to block external download link access if visitor not referred from WP?
- How to skip woocommerce PayPal redirection?
- Auto Stock Update after Order cancel from Admin of Woocommerce?
- Notifications Bar on home page only
- disabled plugin and now wordpress won’t load
- How to provide page_template path in custom plugin using WordPress
- WordPress User Registration/ Sign Up -> Able to take Paid Certification Courses & keep track of Completed Certificates
- Prevent primary navigational menu from expanding during page load (WordPress / Astra Theme)