I think you just need to add it to the query vars
add_filter( 'query_vars', 'my_query_vars' );
function my_query_vars( $query_vars ) {
$query_vars[] = 'foo';
return $query_vars;
}
Related Posts:
- Why “?v=hash” is added to my URLs? [closed]
- use query string in URL to display content on the page
- Pulling a parameter out of the URL of a WP link without “?” or being sent to a different page
- Dynamically change page title from URL param
- 404 error when passing “cat” parameter to URL
- HTTP 403 Error when passing parameters to URL
- WordPress get parameter ‘unapproved’ and ‘moderation-hash’
- How to parse a custom url (within WP site) and obtain params passed to that URL
- Passing values through url for checkbox fields with same name to get?
- Custom HTML title based on URL parameter
- How to get a page url segment on wordpress?
- Different url to same page (with dynamic content)
- Add a paramter to page url
- Why “?v=hash” is added to my URLs? [closed]
- Add more than one query parameter onto wordpress url
- Set A Cookie To URL Parameter, Pass Cookie From Page To Page To Alter Post
- Add addtional page parameter before loading the page
- Use URL parameter to create dynamic content
- Pass post title as URL parameter
- How to pass parameters thru URL?
- Duplicate pages with ?s parameter
- How to use query string in URL to display content on the wordpress page
- help me remove this additional parameter in url
- How do you retrieve a post by slug name through REST API?
- How does routing on wordpress work?
- Redirecting to old domain after migration
- Unwanted media library URLs in posts?
- How to remove file versions from the file source links in wp_head?
- Add menu and submenu in admin with a URL instead of slug?
- Update media file url in wordpress media library
- Change logo url link
- As soon as I add a custom query_var using the filter, my pages point to an archive page – why?
- Best way of removing emoji support from url / slug only
- Password protected page Hash url
- Remove site root trailing slash
- How to create a page for authors? like www.myblog.com/author/
- Custom Post type permalink structure with custom_post_id
- Setting a url for a page
- Old URL Redirect website after migration
- Best way to give site sub-page it’s own domain?
- Getting 404 Hits on URI -/-/-/-/-/-/-/-/-/- . How to deal
- Rewrite custom post type URL parameters
- How to change logo url [closed]
- How to show the root webpage on all subpaths
- Is it possible to configure WordPress’s Core Files to accept duplicate Child Categories?
- Make homepage a non-WordPress page
- Avoid the removal of “https:” from URLs
- Content duplication issue with dynamic URLs
- Host frontpage via example.com and everything else via example.com/blog
- Is get_permalink also the canonical URL?
- wordpress.com website url structure [closed]
- Block direct url enter
- How do you make homepage redirect to it’s slashed version?
- Can i have access to my WordPress Website again?
- How to make pages slug have priority over any category
- Site transferred to new server produces 404s
- How can I make my blog urls have words of the title in them?
- Website Address Keep redirect to website after migration attempt
- Change URLs depending on alias
- Random string added end of the url blog page wordpress [closed]
- How do I avoid messing up URLs when switching from example.com/subdir to example.com?
- Made WordPress URL and site address URL the same
- How can i get rid of wp in front of URL
- Alternatives to site_url() and get_template_directory_uri()
- Blog post – single.php url
- WordPress File URL Path Incorrect
- Unicode characters are saved in a funny way in the DB
- Replace category name with article id in wordpress urls
- Redirect Old wordpress url to new wordpress url
- WordPress Primary Category Changes After Import, Permalink Issue
- Make unique url to unlock a post
- How do I structure my permalinks in WordPress?
- How to set wordpress url on local host to access it via VPN
- unique url access control
- I found weird email address appended to some of my URLs, what does that mean?
- How to get custom URL routes property_id in wp php plugin?
- index.php shows up in url
- how to remove this #.XsZOUWhKjIU from my wordpress url
- How to allow URL with filename & extension in wordpress?
- Cannot Save Changes After Updating URL Settings
- Avoiding the -2 in slugs
- How to encode correclty an url with the char “&” for an email?
- How do i create navigation links like this in wordpress? [closed]
- Blog post Links leading to home page [closed]
- Let WordPress to go opening an external URL
- Change default query parameters
- Access link page and not folder content of that link
- problem getting audio url
- Text widget form and URL variables
- wp-login.php ampersand in url results in 404
- How to eliminate the Web Address / Web Link textbox from comment forms
- URL displays different page (a loop)?
- Change path/url of admin-bar.min.css
- Options and template changes not updating
- Why is my WordPress install using full server directory paths for media URLs?
- Accidentally Changed WordPress Url
- Typing local WordPress URL works, but clicking the same link does not
- 404 error on cyrillic url
- Block a specific url request
- What purpose does /embed/ URL have and how to avoid SEO problems?