Skip Navigation

[Resolved] Custom post urls redirect unexpectedly to site root

This thread is resolved. Here is a description of the problem and solution.

Problem: Custom posts are unexpectedly being redirected to the home page.

Solution: Check the post type options to be sure publicly_queryable is checked.

This support ticket is created 3 years, 8 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 2 replies, has 2 voices.

Last updated by Steve 3 years, 8 months ago.

Assisted by: Christian Cox.

Author
Posts
#1693173

See hidden link

If you click any of these links to see an activity (the cpt) the link redirects to the site root rather than that posts page

Ive turned off all but toolset plugins and deactivated my theme, refreshed the permalinks and turned off caching and deleted the cache.

Im at a loss as to what to check next can you give me some guidance

Thanks

#1694501

Hello, a few more things you can try:
- Edit the Activity post type in Toolset > Post Types
- Check to be sure the status is Published
- Check the options panel. Be sure these are checked: Rewrite, Pages, publicly_queryable. The permalink mask should be EP_PERMALINK by default. Take screenshots so I can see the other options, and include it in your next reply
- Check to be sure there is no existing Page with the slug "activity" - that can cause problems. If you have one, trash it and empty the trash, then resave permalinks. Use a WordPress Archive instead to design the /activity URL instead of a Page.
- Check to be sure there is no custom taxonomy with the slug "activity" - that can cause problems. If you have one, rename it and resave your permalinks.
- Check to be sure there's nothing odd in your .htaccess file. A standard one looks like this:

# BEGIN WordPress
# The directives (lines) between `BEGIN WordPress` and `END WordPress` are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress%

- Log in with FTP and double check to be sure there is no /activity directory left over from a previous site. If there is one, rename it or delete it
- Check your wp-config.php file to be sure there's nothing relevant to the /activity directory
- Add your site debug information in your next reply so I can see some other configurations. We have information about that available here: https://toolset.com/faq/provide-debug-information-faster-support/

#1695253

Christian Thanks so much , somehow publicly_queryable had gotten unchecked.

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.