David Cox
Forum Replies Created
-
Still having trouble after installing 3.1.2.
I’m not using multisite, and the 404 errors come whether or not the page or its parent is designated HTTPS secured.
https://domainname.com (the site home page) – works
https://domainname.com/section (a normal page of the site) – works
https://domainname.com/section/page (a page that has section as its parent) – returns WordPress generated 404Forum: Plugins
In reply to: [Plugin: WP Subdomains] Category name being dropped from post title linkI’ve found a solution.
Seems like the plugin was matching ‘javascript/’ and replacing it with nothing. I could manually write a new permalink so it would not read ‘javascript/’, but I didn’t want to have to do that, so I dug a little deeper.
The rewriting is handled in this file:
‘plugins/wordpress-subdomains/plugin/classes.php’Around line 475 there is the
getCategoryPath()
method of theWpsSubDomainCat
class. That prepares search and replace strings for another function to use for . . . searching and replacing.There are two if statements. The first prepares search strings. The second prepares replacement strings. I converted the first if statement to prepare a string with forward slashes at the beginning and end (would match ‘/javascript/’). I converted the second if statement to prepare a string that would simply be a forward slash or a string that ended in one (would insert ‘/’).
This worked great for permalinks that had the category name at the beginning or end of a slug.
I have no way of testing it in all situations, so I don’t know if it breaks anything, but I’m able to navigate around my own site just fine (https://www.dconstructing.com)
If you want the actual code that I used, feel free to contact me and I’d be happy to share.