How are templates mapped to CPTs?

I have a custom post type (landing pages) and custom taxonomy (landing page type).
The custom post type permalink structure is based on the term selected for any single post.

Here’s the structure:

Taxonomy (landing page type):

  • term 1 = paid (/start/)
  • term 2 = podcast (/pod/)

Single post:

  • Title: Great new podcast
  • Term: podcast
  • Permalink: /pod/great-new-podcast

Single post:

  • Title: Amazing landing page
  • Term: paid
  • Permalink: /start/amazing-landing-page

Situation: I have a few templates (section templates) created that we insert depending on the type of landing page it is (different types of paid landing pages, podcasts, etc.). We created all the LPs, but it was found that the term was never set (so defaulted to /landing-page/amazing-landing-page for the permalink). Upon updating the term (which changes the permalink), the templates are no longer present.

Question: when you build a page in bricks, is it associated with the permalink in anyway? Setting the term (and therefore changing the permalink) makes the template disappear. Unsetting the term (and therefore changing the permalink back to the original) loads normally.

If so, does this mean we have to copy the og set up over to the new URL, or create completely new pages?

Thanks in advance.

A template can be shown by its conditions, or loaded from the page itself.

As it happened after changing the URL, i would go check the templates conditions first. Open bricks, templates, the template, press the gear icon at the left top and see where it should show up.

Maybe make sure the custom field/post type is connected the way they should

What appears to be happening is Bricks is set to be available for certain post types, but the URL change appears to break this and Bricks instead falls back to treat the new permalink structure as the built-in post post type.

The template setting is “single” and it did not have display conditions set. Even with conditions set, Bricks still does not register with it when we select a term (when we don’t select a term, it does register it).

So, I think this has to do with how the rewrite rules are set and Bricks not knowing that even though the permalink is not the CPT permalink, it still is the CPT.

Something should be loading the template. If it’s not a condition, it should load from the page itself?

If it’s associated with the post type, then there might be the problem after rewrite, Bricks might not recognize it anymore to be from that posttype.

I would go inspect the CPT settings to see for mismatch.