You should find alternatives, as noted on the codex article of “Reserved Terms” in WordPress (emphasis mine):
There is a complete set of reserved keywords, or terms, in WordPress
that should not be used in certain circumstances as they may conflict
with core functionality. You should avoid using any of these terms
when:
- Passing a term through a $_GET or $_POST array
- Registering a taxonomy or post type slug
- Handling query variables
You could use ?search=
in place of ?s=
and ?pg=
in place of ?page=
for example.
Or, depending on what exactly you’re doing, you could create a custom rewrite rule with add_rewrite_rule()
and then you could name the underlying query vars whatever you wanted.
Related Posts:
- WordPress pre_get_posts with combined results of two queries (OR)
- WP_Query not ordering correctly
- WP Query Relations / Compare
- WP_Query leaking absurd amounts of memory
- Fatal error: Class ‘ms\WP_Query’ not found on plugin initialization [closed]
- Using query_vars filter
- Register custom query args parameter for WP_Query()
- How to add multiple custom URL variables?
- Getting wrong relationship value in $args in wp_Query?
- Check for featured image in WP_Query
- Why Does get_posts() Return an Empty Set?
- How to get data from WordPress $wpdb into React Gutenberg Blocks Frontend?
- get_posts / WP_Query Memory size of 134217728 bytes exhausted
- How to ensure “the_content” filter runs only for the main displayed content?
- add_filter and remove_filter added before and after wp_query
- How to get all images and their thumbnails from wp media library
- How to create a dynamic page based on form data with a plugin?
- How to Display Custom Post Type’s Gallery (images ) in Through WP_Query
- Handling form request from plugin file
- Cannot search post by taxonomy
- How to get orders with used coupon in WooCommerce
- WP_Query with tax_query, order by most ‘matches’
- How to print raw query from WP_Query class just like in CodeIgniter
- Get a custom table to an array
- WP_Query returns no results
- Finding posts containing matching array elements in a meta field usign WP_Query
- Create a custom display order in the main menu
- manage_posts_custom_column, showing serial number using increment in loop
- Error : “Cannot use object of type WP_Post as array in”
- Proper way to run wp_query from inside a plugin
- using new WP_Query in save_post function alters $post
- Slow WP_query due to nested wp_query. Need Suggestions
- ORDER BY wp_post custom column name in wp_query
- How to create database table, add data, update and delete using wpdb via plugins?
- $paged always 0 on plugin’s custom page
- Elementor custom Query with ACF fields to show matching woocommerce products custom fields
- WP_Query filters
- How to fetch only current hour posts?
- How to get Metabox custom field to show checked if value is updated using post meta query?
- Search: how to extend the existing search to include a custom table
- Admin Posts List (edit.php) by post IDs
- how to get all the child category name in a specified category name?
- how to invoke wordpress API from other existing PHP system
- wp_get_post_terms Order by not working
- How I can use order by of the custom post title?
- How to query children by post name/slug
- 400 Bad Request, in wordpress theme development, wp_ajax
- Why in this archive page that call query_posts() function show only the last 10 posts?
- insert query on a custom table using ajax with jQuery plugin Jeditable
- Store custom meta box data as serialized array
- Taxonomy archive page listing terms instead of posts
- how to load the comment template from a plugin
- How remove trashed WooCommerce orders from wc_get_orders() result?
- Auto-complete or auto-suggest from stored data in database
- Get post thumbnail in WP_Query
- Brainstorm – Slow Query from Plugin Need to Speed It Up
- Pagination not working with custom wp_query
- Get Posts by IDs (optionally)
- Checking for existing title in custom db query not working
- Adjust query on single
- Is there a (preferable built-in) way to check what custom queries are used in a theme?
- WP_Query order posts by category
- Load specific page when a custom URL is hit
- Is it possible to use the MySQL’s ORDER BY FIELD() clause as part of the pre_get_posts hook?
- Multiple dynamic Tax Query – pass taxonomy argument from array
- How to grab data after wp user search is complete
- How to check category name available or not
- Home page is not loading, where in other pages are displaying on the site
- How to get inserted row IDs for bulk/batch insert with wpdb query?
- how to create a shortcode from a variable in plugin
- User meta query using Wildcard
- Group By in a Metaquery
- WP Query date_query with several date range
- bindParam? WordPress 4.9.5 SQL LIKE statement %s and %LIKE%
- Making Woocommerce optimized for more than 500k products
- Post Pagination does not working on WP-Query
- pull data from wordpress database
- How can I query 3 posts from diferente categories (one of each category)
- Query only title/field/featured media of posts [closed]
- Array/List Edit in Backend
- Custom MySQL query to pull out Advanced Custom Fields?
- post_results filter confused by pagination in sidebar and main section
- Can’t get query string in ajax call
- Get custom wp_query search results to appear on search.php
- WP-Snap too slow (caused by WP_Query?)
- Add query string variables to all hyperlinks URL matching a specified domain
- loop and in admin header problem
- How do I query posts and have their related taxonomies returned in the results?
- Best Way to Inventory the Media Library of a 200+ Multisite Installation?
- $_GET vs get_query_var()
- Checking if the query is empty does not work
- What is the meta_query key name for the woo product average rating? [closed]
- get the queried_object of an url
- Return custom product in ajax call loop
- Can I log the searches that are returning 404 in the DB?
- filter on get_posts efficiently
- What’s the difference between term_id and term_taxonomy_id
- Add and in the header while looping over custom query in page template
- Why is WP_Mock not used instead of WP_UnitTestCase for writing unit tests by most plugins?
- Enable a role named ‘backend_user’ to access my plugin pages