• 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 type

    So 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.

Viewing 16 replies (of 16 total)
  • Thread Starter pmdci

    (@pmdci)

    By the way, I moved the subject of this topic to https://www.ads-software.com/support/topic/404629 which I think is more to the point of what I was trying to do and shows the limitations of WP. I was hoping that this would attract people’s attention to the issue and perhaps collaborate on how to find a solution for it, but I got no luck (which is often the case).

    Cheers,
    P.

Viewing 16 replies (of 16 total)
  • The topic ‘Weird behaviour with /post-type and /custom-page’ is closed to new replies.