You can filter request
and unset m
there, which will remove it from the query. This is a simple example that will remove it in all cases, you probably want to narrow the check down with something else, like checking if pagename
is also set:
function wpd_request_filter( $request ){
if( isset( $request['m'] ) ){
unset( $request['m'] );
}
return $request;
}
add_filter( 'request', 'wpd_request_filter' );
You can var_dump( $request )
in the filter to see what it contains for different types of requests.
Related Posts:
- Pass form input via url variable
- How do you retrieve a post by slug name through REST API?
- How does WordPress generate URL slugs?
- 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
- Dynamic URL generates dynamic content
- Pages redirected to attachment post
- 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
- Which of WordPress’s .php files need to be directly accessible via HTTP?
- Remove site root trailing slash
- How do I override the emoji url?
- Site broken after using URL Change in Admin
- 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
- Changing WP_Query params with url Query Var
- Best way to give site sub-page it’s own domain?
- Dynamically change page title from URL param
- What is the correct way to convert the absolute path of the executing script to a URL, in WordPress?
- Getting 404 Hits on URI -/-/-/-/-/-/-/-/-/- . How to deal
- 404 error when passing “cat” parameter to URL
- How to change logo url [closed]
- 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
- how to trace a file by the route url
- Is get_permalink also the canonical URL?
- Remove trailing slash from previous_posts_link()
- Block direct url enter
- Moved WP into new folder. How to fix image links in posts?
- How do you make homepage redirect to it’s slashed version?
- Can i have access to my WordPress Website again?
- Using esc_url_raw with protocols properly
- How can I make my blog urls have words of the title in them?
- How to parse a custom url (within WP site) and obtain params passed to that URL
- Change URLs depending on alias
- Passing values through url for checkbox fields with same name to get?
- wordpress copyright dynamic
- Multiple duplicate URL’s
- Made WordPress URL and site address URL the same
- How can i get rid of wp in front of URL
- Dynamic URL and pass the data to an iframe
- DNS – Change WordPress Site Name?
- Alternatives to site_url() and get_template_directory_uri()
- Unnecessary url
- How to close tab automatically if URL has specific word? [closed]
- Replace category name with article id in wordpress urls
- Redirect Old wordpress url to new wordpress url
- Finding URI in Child Theme
- Make custom system url
- WordPress Primary Category Changes After Import, Permalink Issue
- Sanitizing URL in a WordPress plugin
- How to display translated content with custom slug?
- How to get a page url segment on wordpress?
- How to set wordpress url on local host to access it via VPN
- How to create a user ability to save pages with full url?
- 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
- Add more than one query parameter onto wordpress url
- WordPress Website change directory
- Allow duplicate slugs for pages and posts
- 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]
- Change dynamically URL to SEO friendly via .htaccess?
- Get userdata from url
- How to make url variable?
- Let WordPress to go opening an external URL
- How do I make images open in a new tab by default?
- How to pass parameters thru URL?
- problem getting audio url
- Domain name to a page
- 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
- Append custom parameter to taxonomy/term URI
- 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
- How to write url to display all posts of certain type and taxonomy with given term_id
- Where can I add list of external URL for WP ADD link tool?
- WordPress page URL: Get rid of /wp-content/… part from URL
- How to create multiple urls for a same page contents in wordpress