Hot answers tagged urls
WordPress tries to guess what post the user want to see by post name. That is what is making both example.com/new-bikes/ktm/duke/ktm-690-duke-2012/ and example.com/new-bikes/ktm/yamaha/ktm-690-duke-2012/ return the same and "correct" content. What is important is that, if you see at the source code of example.com/new-bikes/ktm/yamaha/ktm-690-duke-2012/, you ...
is there a way to update all media urls in wordpress I had a similar issue with my media files not having the correct file location after a Wordpress upgrade (somehow all the media links switched to a crazy incorrect directory), so I found Upload URL and Path Enabler which was able to rewrite all media URLs to a different path location where all my ...
You can explode URL by ? and take the first part: $url = explode( '?', esc_url_raw( add_query_arg( array() ) ) ); $no_query_args = $url;
Settings --> Permalinks. Choose 'post name'. See the official Wordpress codex page for more.
Only top voted, non community-wiki answers of a minimum length are eligible