Weird behaviour with /post-type and /custom-page
-
Hi there,
I am quite puzzled about a WP behaviour with custom post types. I hope someone here might have an idea of what might be happening…
Say I have three custom post types, which I use page templates for them:
* Car – using page-cars.php for this post type
* Hotel – using page-hotels.php for this post type
* Partner – using page-partners.php for this post typeSo far, if browse to:
/partners or /hotels or /partners, it shows the correct page, each page querying the correct post type.
However, if I browse to /
<post-type-name>
(that is, the taxonomy name) rather than the custom page I created for them, WordPress redirects to the custom page that queries the post type. For example:/partner/ -> redirects to /partners/
/car/ -> redirects to /cars/However, for ONE POST TYPE ONLY (say, hotel), it DOES NOT WORK:
/hotel/ -> redirects to / (that is, the root directory).
I am quite puzzled, since I there is almost no difference in these post types configuration (rewrite, query, etc).
Moreover, the query code in the custom pages for these post types is pretty much the same, only that the post_type name changes. What really changes in these pages is some of the HTML and CSS.
Any ideas of what might be wrong?
Cheers,
P.
- The topic ‘Weird behaviour with /post-type and /custom-page’ is closed to new replies.