The issue we’re having is that when we recently changed Site URL in the WP Settings from http://uufsd.org/wp2 to http://uufsd.org, clicking a service results in a 404. If we switch the Site URL back, then the service links work again. The Service Plugin itself seems to still display services as does pages that show a list of services. The thing that doesn’t work is clicking on the service itself to see the details of the service. Using version 1.1.2 of the UUA Theme.
I just went to your site and it looks like the services are linking to the correct URL (without /wp2 path). Also, the 404 error page looks like the one provided by your web hosting, not the theme. This may not be a WordPress issue but in fact a server issue. 1) Make sure your .htaccess file is configured properly. 2) Try to flush rewrite rules in my second answer below.
When you change the URL of a WordPress website, lots of links change. See this article (or search for “WordPress change URL” or “WordPress move from subdirectory”) for details of what you need to do.
If you’re comfortable running SQL Statements directly in your database, you could try running the following SQL Statements to find/replace all instances of your old URL:
Important: before trying, please back up your database and files.
Interestingly, Dave Masser has the same issue and says, “If it was just the old services created before the switch that were having problems, using this update tool would make sense. But services created after the switch also 404. And it is only services, nothing else on the site has this behavior, which makes me think this isn’t a general WP issue, but something specific to how services work. Do you think re-installing the service plugin could help?”
Interesting– now I’m wondering if this is related to the `rewrite` argument passed to the register_post_type() function of the plugin (where it rewrites the plugin slug/URL for the services post-type). Specifically, the `with_front => false` argument.
The other thing you could try– is to flush rewrite rules or permalinks (usually needs to be done manually for new custom post types) from the Dashboard:
- In the main menu find “Settings › Permalinks”
- Scroll down if needed and click “Save Changes”
- Rewrite rules and permalinks are flushed.
The issue you’re experiencing is related to how your server is configured. It seems, you’re already using the /services path for something else and thus the web server returns a 404 error because the WordPress service URL does not exist within your current /services directory.
If you go to the following URL, you’ll see the web server directs you to some other website: http://uufsd.org/services
If you need support resolving this issue, email Vess Studio at: firstname.lastname@example.org and we’d be happy to work with you to fix this.
Your answer solved the problem. Thanks!