Let me choose permalinks
That should only happen if, as you say, there is a post with the same unique permalink. Any in the trash will still have the same effect.
That should only happen if, as you say, there is a post with the same unique permalink. Any in the trash will still have the same effect.
“Post name” permalink returns home page for custom posts
How to rewrite the post URL according to the category?
You just need the last part of your function where you switch to blog 1 and get the menu. function wp_multisite_nav_menu() { $args = [ ‘menu’ => ‘Main Menu’, ‘theme_location’ => ‘main-nav’ ]; switch_to_blog( 1 ); echo wp_nav_menu( $args ); restore_current_blog(); }
Yes, the correct tag is %monthnum%. Here’s a list of all the default rewrite tags, for reference.
This is not a problem. Every / is already a static string. Avoid non-ASCII characters, dots (.) and %, restrict the string to lowercase letters a—z and maybe numbers – but make sure the pagination rules do not conflict with it. A static string /2/ might be read as page 2 by WordPress. Besides that, … Read more
I faced the same issue with some of my posts (not all). After updating my permalinks from /%category%/%post_id%/%postname%.html to /%postname%.html it was solved. Only issue that remains are the links to the posts shared on other websites. The link I shared (using the Sharexy plugin) to Facebook translated the permalink to the one with only … Read more
Strange number at the end of wordpress permalinks
How to add .html to the end of the permalink
There are several ways to achieve this, depending on the permalink structure of your posts. Assuming the post slug is part of the permalink structure, you can get the post slug from the post URL and fetch the corresponding post by using WP_Query with the name-parameter. Let’s assume the structure of the URLs is http://example.com/{post_slug}/. … Read more