WordPress.org

Ready to get started?Download WordPress

Forums

Post Types and Page Templates (3 posts)

  1. ChadT
    Member
    Posted 3 years ago #

    Hi,

    I have set up a custom post type of "Products"

    I have also set up a Page called "Products" - which shows an introduction to products etc

    However, I have also added a page called Portfolio and set it to the parent of the Products page, which will display all post types of "product"

    However, because the url is products/portfolio - I am guessing WP is thinking that this must be an existing product rather than the page that has been set up?

    Will also be adding other pages such as products/promotions etc

    Any help would be much appreciated

  2. ChadT
    Member
    Posted 3 years ago #

    Some people having trouble understanding my problem, hope this can clarify:

    Basically:

    http://localhost/products/product-name = post type

    http://localhost/products = page

    http://localhost/products/portfolio = product child page

    but it thinks that portfolio is a post type, which doesn't exist and so renders 404, which makes logical sense.

    However, wondered if its possible to make wordpress check if a page exists first?

  3. Ronald Huereca
    Member
    Posted 3 years ago #

    A bit of a hack, but this code worked for us: http://wordpress.pastebin.com/y5bicgum

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.