Custom Post Type - Builder Layout

Tim Greetings! I have a custom post type set up with custom press (Plants). I had the individual post pages show up fine and were edited but now they aren't showing up and instead showing the homepage (still the post's URL though).

Screenshot 1

I had thought I had made a layout within the theme for 'Single Plant' but now it's showing I don't have one within the theme (Spring) in Builder. I could be wrong. Though I'm not sure what happened and why there isn't a layout any longer or why the 'Plants' posts aren't showing up as they were.

Hope you guys can help with this. I know that there was a change in Builder with adding Woocommerce templates within Builder done by someone at WPMUdev, not sure if that is related or not.

Much Love,
Ciro Bey

  • Kasia Swiderska

    Hello Ciro,

    Where did you create layout for plants? On your main site or on builder in subsite? Is it possible you were editing the same theme once from subsite and once from main site?
    I checked theme on subsite and in layouts it has single-plants.php template

    But one I downloaded from main site does not have that template.
    Could you describe how you created that theme? Was it always working on main site or have you tested it before on moor subsite?

    More details is better - then I will be able to follow your steps to replicate issue.

    Can you for test purposes switch to default WordPress theme (make a backup of your site first) - I'm asking for that because plants are recognized as home/blog layout and not single posts - that is why home page layout is loading.
    If they would be recognized as single post type, even without single-plans.php template single.php would be loaded.
    So I would like to check if the same issue will be present when default theme is used. If yes, then it means problem lays somewhere else.

    Except Builder and Upfront update have you installed any redirect plugins recently? Or any new plugins or updates?

    kind regards,
    Kasia

  • Ciro Bey

    Hey there Kasia Swiderska
    The subsite has a different theme with the layout for plants.

    I may have not created one for tamanasprings.com and it was using the single post template beforehand. That may be the issue is that it got switched to the home/blog layout.

    I had installed 'Custom Permalinks" plugin and changed the URL (tamanasprings.com/grow/plants) to URL (tamanasprings.com/plants) as a redirect.

    This change seemed to be the issue. Deactivating the plugin seemed to allow the plant posts to load regularly with the previous layouts/pages. Would there be anyway to have the custom permalink for the plants archive page without having the post pages be effected?

    Thank you for the clarity.

    Much Love,
    Ciro Bey

  • Kasia Swiderska

    Hello Ciro,

    I had installed 'Custom Permalinks" plugin and changed the URL (tamanasprings.com/grow/plants) to URL (tamanasprings.com/plants) as a redirect.

    That actually explains everything. When you changed that permalinks to plant that created slug conflict. Plants are name for custom post type and you created archive with plants slug in url. WordPress does not handle well when two different things are using the same slug.

    You would need to use different slug there - like "our-plants" or "all-plants" - this way there will be no more conflicts. I changed that slug for now to my-plants and as you can see now plants are showing correctly now.

    kind regards,
    Kasia

  • Ciro Bey

    Hey there Kasia Swiderska
    On moor.tamanasprings.com I have the same setup except that the /Plants page is an actual page and not an archive page like it is on tamanasprings.com. I'm not having any conflicts on moor.tamanasprings.com would that be because it's a separate page?

    Also, I'd like to keep the url /plants if possible.

    On tamanasprings.com
    I noticed the archive page wasn't for the plants custom post type but was for a regular post category and I'm just displaying the custom post type posts there.

    I set up a page called plants in pages and still had the same issue. I had the "Plants" post category still active as well. The slug for the page was /plants and the slug for the category was /my-plants.

    I deleted the category "Plants" and still had the same problem. So I disabled the Custom Permalinks plugin and had no problem.

    I remade the category "Plants" while keeping the page /plants and still no issues. Doing this test seems to show a problem with the Permalinks plugin. I'm not really sure why or what's going on.

    Though I had figured that since these posts are for a custom post type (unrelated to the category or page) then they would display fine. Having the slug for the post type as /plants and having the same slug for a separate page /plants has no conflict. But when I assign a custom slug via the permalinks plugin to a post category (regular post type) as /plants there is a conflict. Also, if I use the Permalink plugin for the page slug (ie to delete a parent page from the slug) there is still conflict. Seemed that even if the plugin was enabled with nothing entered in the slug fields there was still the same issue.

    I also tried loading the custom post type archive page (/plants_) and in Upfront Editor the changes wouldn't save to the live site but stayed as the default Archive page layout. I'm not sure about that either.

    Ideally looking to have the /plants "base page" be connected to the regular post type in some fashion as to seemingly resemble that the custom post type "plants" is part of the regular blog posts even though they are separate if that makes sense.

    Feel free to take another look if you'd like.

    Much Love,
    Ciro Bey

  • Nithin

    Hi Ciro Bey,

    Hope you are doing good today. :slight_smile:

    As mentioned by Kasia if you are trying to make the slugs same for your plants page, category, and cpt, it could cause conflicts down the road when trying to make use of it.

    However, I tired to replicate the issue as you have mentioned, and changed the custom permalinks slug using the plugin for the category /grow/plants to /plants, and your page does seem to work fine. Could you please check, and see whether it works fine?

    Also the Upfront editor was loading loading fine, for all pages:.

    If hope this is the setup you are trying to achieve, if you still have issue please do point what I'm missing so that I could give a closer look. Have a nice day. :slight_smile:

    Kind Regards,
    Nithin