I’d recommend using add_query_arg()
:
$url = add_query_arg(array(
'foo'=>'bar',
'custom'=>'var',
'page'=>'myadminpage'
), admin_url('admin.php'));
The second argument, admin_url('admin.php')
, is optional – and if omitted it uses the url of the current page you are on.
Related Posts:
- How can a plugin create a page/form in the front end?
- Looking for WordPress System Diagrams
- How to add Request header in WordPress remote api calls
- Init action hook running late after PayPal’s return url?
- Get specific color from admin color scheme
- wp_remote_get doesn’t work with secure connections https?
- How do you create a custom edit.php / edit pages page
- Edit the output of wp_widget_rss_output()
- Why are two functions over-riding each other?
- How to Parse an Array of Elements in Gutenberg Block
- how to set context in WordPress for unit testing
- Custom rewrite rule serves content, but returns 404 error code
- Should I ask my Twitter plugin users to create their own Twitter App and API Keys to use my plugin?
- How to edit mySQL wp_posts table from plugin php?
- Creating a Wordpess Plugin that writes data to a csv file. The data doesn’t show in the csv file?
- Support auto-save and revisions for custom fields
- Gutenberg – What is the best way to save/update post meta?
- Dequeue theme stylesheets but keep widget styling on custom page template
- WP_Query with tax_query, order by most ‘matches’
- Using the Settings API, how should I add multiple values to an option?
- WP custom menus error > menu name already exists?
- Plugin updates, version dependencies, and backwards compatibility
- Where and how does WordPress store and use its plugin and hook information?
- Cache directory needed for plugin
- How to sanitize user input?
- Remove Internal Style Sheet if no Value Provided?
- Widget update function not saving values
- WordPress after content Hook & external template part
- get_the_excerpt() is not returning an empty string when the_excerpt is blank?
- Storing product price data in the database
- Does the order of sections in readme.txt matter?
- get_query_var not works
- Correct check for any admin page with editor
- Add column in WP user but it goes wrong
- Adding more text to a post, after it was published
- How to modify the comments to be displayed in a post?
- Find out Requires WP tag for a plugin when submitting it
- what is the difference between these phares?
- WP_Query filters
- Plugin Architecture Question: How to avoid using transients
- SSL certificate verify failed
- How to load library scripts in admin from plugins in noConflict wrapper?
- wordpress how to query wp_options table
- rest_no_route on custom API endpoint wordpress
- How to query custom db table?
- How to only load css for used blocks on frontend
- adding wp-cli commands to plugin: how to document to users?
- Additional classes `undefined` after saving post in Gutenberg
- How do you submit a Gutenberg plugin?
- Creating an empty page programatically
- Multiple API Endpoints (wp_remote_get)
- plugin_dir_url & plugin_basename not working when plugin dir is outside wordpress dir
- How to replace default comments with custom HTML?
- Invalid hook call on save, not edit when using swiper slider
- Call to undefined function is_home() or any conditional tags
- WP nonce field checkbox prints checked=’checked’ outside input field
- WooCommerce Endpoints content
- Make dynamic string translatable
- Creating two tables in database on activation hook
- wp_schedule_event is registered but function isn’t running
- Simple plugin don’t display content
- Cannot output plugin twice with shortcode
- How to make an admin plugin menu page go full screen?
- It is possible to pass $args that sent by add_settings_field() inside another function?
- Change reminder email date to 14 days before
- Gutenberg – Call google map render function in save after DOM has been rendered
- Woocommerce get_term_by() in transition_post_status hook doesn’t works
- Does $this context change in an AJAX callback?
- Home page is not loading, where in other pages are displaying on the site
- Custom table / Alternative to WP_List_Table
- Why is that only the first row getting inserted into Mysql table when i import csv file on backend custom plugin?
- Adding Amchart Interface to WordPress API
- WordPress Own Rewrite Rules
- WordPress with React: Saving and Using Data Collected with fetch
- Don’t print customizer styles when no setting has been used
- bindParam? WordPress 4.9.5 SQL LIKE statement %s and %LIKE%
- tweaking the
- Plugin with functions inside a class & how to trigger WP CRON
- User Registration Moderate
- external Integration with wordpress timeout error
- add_settings_error on validating plugin options API
- Implementing Select2 plugin into WordPress
- Problem to return more than single line captions
- Unable to show a message after plugin activation
- Use plupload to upload images and save them to custom folder and database table
- How to add conent (text) to Add New pages form of admin in WordPress
- Can I access WordPress API’s from within plugin scripts?
- Is there a way to make is_search() always return false
- Ajax url value to pass ‘variable’ to use in query
- Apply Filters Causing a 500 Internal Server Error
- How to do searching based on keywords added in page
- Open media box library from link
- How to only Load scripts on variable products page
- Using tag or inline style attribute?
- remove () from category number [closed]
- Is there a canonical way for a plugin to install a mu-plugin or drop-in?
- How can create a custom plugin to call my webapi after any registration or membership plugin functionality
- Reinitiate Gutenburg’s blocks using javascript
- Generating Multiple Divi Pages from Database
- Is it smart to require_once wp-admin/includes/plugin.php when you need only one function from it