Seeing CPT Post on List Page

Support MB Custom Post Type Seeing CPT Post on List PageResolved

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #23978
    Bret CarmichaelBret Carmichael
    Participant

    H,

    This is me second questions today. I'm sorry.

    I have a created a custom post type called Campaigns. Its slug is /campaigns, and post URLs are /campaigns/my-post-url.

    I have a page called Campaigns where I want to display the list of posts. The page slug is /campaigns. I've used this same configuration previously without any issues.

    I can create my layout of the post list on the /campaigns page. I'm using Oxygen Builder, though I don't think that matters. However, when I view the page in the browser, I get the content of one of the posts.

    Here's an example of this setup working:
    Parent list page: https://vv.leapworks.dev/farmers-markets/
    Child post page: https://vv.leapworks.dev/farmers-markets/dover-farmers-market/

    Here's an example of the setup not working:
    Parent list page: https://vv.leapworks.dev/campaigns/
    Child post page: https://vv.leapworks.dev/campaigns/field-of-honor/

    In the broken example, you will see the child post page content on the parent page.

    Thank you very much for your help. For what it's work, I am really grateful. 🙂

    #23980
    Long NguyenLong Nguyen
    Moderator

    Hi Bret,

    I recommend using a different page slug or post type slug. If you use the same slug, it might do not work in some cases (permalinks). Follow this topic from WPSE to get more details https://wordpress.stackexchange.com/questions/135146/resolve-a-custom-post-type-name-vs-page-permalink-conflict-same-slug.

    #23984
    Bret CarmichaelBret Carmichael
    Participant

    Hi Long,

    Thank you!!! That article you shared solved my problem. I already had post archives disabled, so I went to Settings/Permalinks and hit the Save button.

    You’re awesome!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.