add_rewrite_rule – Page Slug from “/foo-bar/” to “/foo/bar/”
This rule is what I ended up with after finding this post: Understanding add_rewrite_rule add_rewrite_rule( ‘^foo/([^/]*)/?$’, ‘index.php?pagename=foo-$matches[1]’, ‘top’ );
This rule is what I ended up with after finding this post: Understanding add_rewrite_rule add_rewrite_rule( ‘^foo/([^/]*)/?$’, ‘index.php?pagename=foo-$matches[1]’, ‘top’ );
I figured out why this was not working. I had to set the category base to a dot(.) without any plugins but since I had ‘Yoast SEO’ Plugin instead, I had the not set the correct settings. To achieve the permalink structure I required: Without Plugin: Go to Setting > Permalinks Select Custom Structure Add … Read more
on your old domain add this following rule at the top of .htaccess RedirectMatch 301 ^/([0-9]{4})/([0-9]{2})/(.*)$ http://newdomain.com/$3 plase let me know if its work or not.
You just need to check if $customID is set, first. E.g. if ($customID && get_permalink ($customID)) { echo ‘true’; } else { echo ‘false’; }
The slug of a CPT can not be dynamic (actually no slug can be) as wordpress needs to know how to parse the URL very early in the handling of the request. You can probably change the behaviour, but you will only end with the same results that slugs have to be constant even when … Read more
If you currently have /path/to/site.html and change it to /path/to/site, this will affect SEO, as search engines think they know the url (the former). However, there are solutions to this. You can either keep the .html at the end of the URL (there should be no problem to use a WordPress permalink with .html in … Read more
OK so after scratching my head for a day, I decided to rewrite the function. After searching for few minutes, I came across this tutorial that outlined the solution for me. It works like a charm. I hope it helps you guys too.
Your site puts quotes in the permalink structure. Find out where these things come from. Without these quotes it appears to work. http://fohh.vavee.com/2017/06/24/harmony-hall-launches-10th-anniversary-celebration/ A temporary VERY dirty solution is to filter the quotes out of the global $content variable.
Install the Yoast SEO plugin to enable this:
This is a problem with the paginate_links function and having your default permalink structure set to postname/custom but wanting the pagination to use default link structure. If you look at the code – https://core.trac.wordpress.org/browser/tags/4.8/src/wp-includes/general-template.php#L0 You can see the following at the top of the paginate_links function // Setting up default values based on the current … Read more