Redirection after Category Change for Custom Structure
Redirection after Category Change for Custom Structure
Redirection after Category Change for Custom Structure
Permalink Listing WordPress
Why Suffixes Are Appended to (Some) Numeric Post-Slugs WordPress posts can almost always have numeric permalinks, the exceptions being when they might conflict with another post, a feed, or a post post-type date archive, or are otherwise reserved. The wp_unique_post_slug() function mitigates these conflicts by appending a suffix. Potential date-archive conflicts arise when a numeric … Read more
Website appears with wrong permalink in Google’s search
It sounds like you want to create Custom Taxonomies with Pods. This is like creating a new option that you can later add to each item, like adding “Size” as an option to “Shirt”. Then Size would be clickable, and you can see the archives for all similar sizes. This is done with Custom Taxonomies. … Read more
If you are using MySQL 8 and above you can use REGEXP_REPLACE, e.i. UPDATE `wp_posts` SET post_content=REGEXP_REPLACE(post_content, ‘domain.tld\/[0-9]{4}\/[0-9]{2}\/[0-9]{2}\/’, ‘domain.tld/’) WHERE post_content REGEXP ‘domain.tld\/[0-9]{4}\/[0-9]{2}\/[0-9]{2}\/’; this would look for exact match domain.tld/{4 digit int}/{2 digit int}/{2 digit int}/ then replace it with domain.tld/ so it will replace something like domain.tld/2000/01/01/my-cool-post/ to domain.tld/my-cool-post/ Another option if you cannot … Read more
Modify permalink of CPT archive to support two taxonomies
You can simple change this in permalink section. Setting > Permalink > Product permalinks > Select `Shop base` > Save Setting > Permalink > Product permalinks > Select `Custom base` > Enter `/shop/` > Save
make a new structure tag that does some processing
Your code seems to work fine with slight modifications. Taken from here: https://developer.wordpress.org/reference/functions/add_rewrite_rule/#comment-content-4787 First off, I moved the rewrite rules to init and modified the regex to match parameters optionally: function wse_414800_rewrite_state_city() { add_rewrite_rule( ‘^(pluginpage)/([^/]*)/([^/]*)/?’, ‘index.php?pagename=pluginpage&state=$matches[2]&city=$matches[3]’, ‘top’ ); add_rewrite_rule( ‘^(pluginpage)/([^/]*)/?’, ‘index.php?pagename=pluginpage&state=$matches[2]’, ‘top’ ); } add_action(‘init’, ‘wse_414800_rewrite_state_city’); And, to be able to retrieve our custom query … Read more