Register an activation hook and then redirect the user’s browser when you’re done installing your plugin.
function myplugin_activate() {
// TODO: Install your plugin here.
// I don't know of any other redirect function, so this'll have to do.
wp_redirect(admin_url('options-general.php?page=myplugin_settings'));
// You could use a header(sprintf('Location: %s', admin_url(...)); here instead too.
}
register_activation_hook(__FILE__, 'myplugin_activate');
Related Posts:
- What’s the preferred method of writing AJAX-enabled plugins?
- How to add a shortcode button to the TinyMCE editor?
- Redesigning Custom Post Type “Add New” page
- Plugin upgrading: Widget settings
- Create a table in custom plugin on the activating it?
- How would you require and automatically download dependent plugins?
- How to save the values of checkbox to the register setting?
- Creating a default Custom Post Template that a Theme can override
- How do I check if my $wpdb->insert() was successful?
- Claim Listing functionality – how to send email to users when their claim has been approved or denied
- Creating a theme option page?
- Custom plugin giving: wp-admin/admin-ajax.php 400 (Bad Request)
- Add post thumbnail from external image with plugin
- Where is the source code that makes the “all” array grabs filters in the $wp_filter?
- Options page not displayed under Settings menu
- Is it possible to add an action to the currently running action?
- Created Widget Not Showing up on Admin Panel
- How to include and use custom class files in plugin?
- Action on post publish
- OOP: Display warning and deactivate the plugin if PHP version is less than 5.4
- wp_enqueue_scripts not working inside shortcode
- Only execute jQuery function(on document ready) on the page has shortcode from plugin [duplicate]
- unzip a folder on specific location and delete the zip file
- Handling jQuery Component Collision
- How to make a custom field as an editor in wordpress?
- Changing labels of status filters for post grid
- Where to call add_shortcode function in WordPress Plugin Boilerplate?
- How to keep users unique id stored in session in addition to IP in WordPress plugin?
- Plugin version is not showing up in wordpress.org plugin directory
- Own plugin corrups plugin-activation
- wordpress plugin is not activating from widget
- uninstall.php file in Plugin to clean DB
- finding whether request is for post, and post id
- How to get specific setting by settings_fields()?
- Save / Show multi line text in metabox
- Python with wordpress plugin
- How to fetch products with the price in a page on woocommerce using a form or live search with php
- Owl Carousel2 image not displaying full width when using Stretch row and content, Stretch row and content(no padding) in wordpress
- Best way to initiate a class in a WP plugin?
- Force language in translate function
- TinyMCE Styles Dropdown not adding html tags other than span
- How to create a child/addon plugin
- How to secure the release of WordPress plugins / avoid copying plugins?
- add_filter doesn’t work
- How can I insert thousands of Woocommerce products by batch with PHP? [closed]
- How do I combine a theme with a plugin
- Use wp-config.php constants in all files of plugin
- how to force tag page layout to use same as search layout?
- Delay JavaScript files from loading
- Run function on plugin activation before plugin is loaded
- a href adds default URL with the given echo URL
- Gutenberg Block Style CSS Class Is Not Applying on Backend
- How to add a WordPress Nonce for this form to avoid CSRF
- Overriding current theme files via plugin
- How to create a plugin that includes all the other plugins?
- Why is it important to check for isset and is_array before checking in_array in this example?
- Upload files to the plugin menu
- WordPress custom plugin that uses woocommerce enabled payment gateway for payment [closed]
- How to call external functions from a PHP script in a WordPress plugin?
- Don’t load the theme for a page FROM a plugin EDITED
- WordPress Feed Creator Name Tag Full Name Instead Of First Name
- How to add custom function to pluggable.php
- How to get Recent Post From Each Category with Thumbnail?
- Remove Zero Money From Previews Order woocommerce
- How use wp_insert_post and add og:custom tags?
- Access remote SFTP server via WordPress login?
- Shortcode do not return the right data in post
- How to change “Read More” text?
- Using id to show item
- How to use wp_editor and save its data in wp_posts table
- My WordPress activation hook isn’t working
- Performance considerations – postmeta table versus new table for custom posts with foreign keys?
- Shortcode and WP query using category attributes
- Securing a plugin pop-up window
- Avoid WordPress header bar when form submission using admin_post in the frontend
- Is admin section completely customizable in terms of styling?
- WordPress ajax error 400 bad request for sending data to remote site [duplicate]
- Better way to run heavy scripts using WordPress database
- Echo custom admin field into a is_single()
- WordPress Boilerplate Plugin doesn’t see callback functions for add_settings_field and add_settings_section
- Hide ‘add to cart’ button for some products [duplicate]
- how to check plugin name unique or not?
- Exclude specifed files from plugin editor
- Add Flatr button to Sharing option
- Change localization only for plugin
- How to get author developer link on plugin page
- wp_schedule_event need to deactivate plugin changing recurrance
- WordPress ajax not working in registration
- Customize Multi-Column Tag Map to fetch specific post-type
- Upload Image to desired directory through plugin
- Jquery post responses 500 error after some time and lastly an 503 error
- How can I delete the options from DB when the plugin is deleted?
- add_meta_box showing blank screen in my page
- is_user_logged_in() undefined at shutdown in plugin context
- What are Seeds? [closed]
- Shortcode cannot parse attributes within double quotes. ” is becoming ” breaking my shortcode
- Plugin translations are not loaded from translate.wordpress.org
- Use inline callable for hooks and filters
- Error in using ‘admin_enqueue_scripts’ action through a class
- How do i fix this error?