function add_custom_query_var( $vars ){
$vars[] = "q";
return $vars;
}
add_filter( 'query_vars', 'add_custom_query_var' );
mydomain/how-we-work/our-process/?q=more-value
You can handle it with
get_query_var( 'q' );
Edit1:
If you want to use with ‘SEO URL’ you need to add_rewrite_rule
function add_rewrites(){
add_rewrite_rule(
‘^how-we-work/our-process/([^/]*)/?’,
‘index.php?pagename=how-we-work/our-process&q=$matches[2]’,
‘top’
);
}
add_action( ‘init’, ‘add_rewrites’ );
Related Posts:
- How to Rewrite WordPress URL for a Plugin
- Mapping multiple URLs to same page
- Any way to make Apache’s internal redirect work?
- Mapping multiple URLs to same page
- How to Rewrite WordPress URL for a Plugin
- How to Rewrite WordPress URL for a Plugin
- redirect word-press page with page values
- A tool to analyze rewrite rules? [closed]
- Symbolic Links on dev box with plugins and stylesheets
- How to call images from your plugins image folder?
- Making a plugin file accessible via url rewrite?
- How to add multiple custom URL variables?
- Custom Rewriting to Plugin with Parameters
- Having Problem On Getting WP Post Gallery Images URL
- Filter to change the content of 404 page
- Add rewrite rule in plugin: with .htaccess in plugin folder or using WordPress functions
- Removing rules from .htaccess
- URLs of plugin resources?
- Rewrite Point Doesn’t Work on Custom Taxonomy
- Rewrite url for existing page without flush_rewrite_rules
- Custom rewrite rule serves content, but returns 404 error code
- URL rewriting must be activated manually for my plugin
- How to restore WP 5.4 behaviour where a numeric string could added to each page URL and parsed as “page” in WP 5.5?
- How to change the URL pattern for single post view
- Why doesn’t flush_rewrite_rules run on plugin activation?
- Redirect traffic to plugin
- Best way to hook a custom url?
- Append country to ‘pretty’ url but serve same page
- How To Consistently Enforce Rewrite Rule in Plugin Development
- How can I rewrite a URL to pass requests to a custom method via AJAX? (I can’t use admin-ajax.php)
- Adding rewrite rule dynamically
- rewrite URL based on selected taxonomy for post page
- Remove custom post type slug from URL and add taxonomy Slug
- Help writing custom function with rewrite endpoint that generates a page from dynamic content
- Possible to get all posts with my shortcode?
- add_rewrite_rule behaving strangely
- HowTo to add my rewrite rules at the beginning, redirect to the right page and flush the rules on plugin activation?
- Can I use %category% like Templates in my Plugin?
- Create page (not the post type) dynamically
- How can I add rewrite rules to a class-based plugin?
- How to list all images used on a specific page?
- How to rewrite URL and get the values?
- configuration of .htaccess for add_rewrite_rule to make sense
- Plugin Development – Get Admin Url (Including cases where wp-admin is not used)
- Forward an old url rewrite scheme to a new one?
- Rewriting Image URLs from dynamic to original
- Custom Path for a Plugin
- The URL of images on my website changed after being set as featured image
- How to save page URL as a favorite
- Custom post type change permalink query
- Getting incorrect filepath inside custom block front-end output using @wordpress/create-block tutorial
- Check current URL is 404 in pre_option_stylesheet filter hook
- Change cannonical URL after changing url with add_rewrite_rule()
- Disabling Yoast, All-in-One, and Rank Math on Certain Pages within a Plugin
- Creating a return url for getting data from external api
- WordPress custom url without using any of the custom tags given
- How does one make a URL return dynamic JSON with custom Content Type?
- Return raw image proxy for wordpress plugin
- Using meta_key & meta_value in add_rewrite_rule
- How to force download a plugin generated file?
- Plugins and how to assign urls to content
- Rewriting URLs with a query string
- Issue on Getting Images URL of the Post Gallery
- How can I send an id over the url?
- Custom slug in url for CPT and taxonomy
- add_rewrite_rule not working
- Use custom clean URLs for a plug in
- Virtual Page with Registration form
- How to use permalink query to go to specific tabs in posts
- WordPress custom link with my plugin
- URL rewrite parameter lost (add_rewrite_rule)
- Menu Structure and URL structure, with Pages and Post-Type-Posts
- Personalized URL for non-logged in WordPress
- esc_url, esc_url_raw or sanitize_url?
- Custom rewrite, url path with parameters to a page
- WP 3.3 How to Add Menu Items to the Admin Bar?
- Unit tests – Dealing with dependencies
- Should I create a theme or a plugin?
- How to change wordpress post title?
- How to properly modify get_userdata in plugin to get roles to update in database
- Version upgrade: can my plugin filter the SQL statements issued during a database upgrade?
- How to show large image in checkout page using WP Ecommerce plugin [closed]
- how to make custom bulk actions for a WP_List_Table (core class)
- Get name and email of current unregistered user, who has recently submitted name and email in comment form?
- Auto save permalink setting page with the plugin activation
- creating custom function to log actions in plugin
- Show custom data instead of 404
- Serve text/html from wp-json API via WPEngine, headers not being set properly
- Add child pages to submenu automatically
- AJAX button with success callback. (Titan Framework)
- WordPress: redirecting to the form page after form submission to admin-post.php
- Performing ajax request in wordpress
- Ajax calling in a function goes into abspath loop
- How to fetch the post content from the wordpress editor before it can be saved(published)?
- Glyphicons Dont Show in WordPress Plugin Only
- Change the search results header from plugin
- Is there such a thing as a WordPress console?
- 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
- Calling get_header() with installed FSE theme