Site logo

Archived topic

Specificity in Content Template blocks

3 replies · Started by Gerald on February 22, 2022

Viewing posts 1–4 of 4

Hi,

I have the following category structure:

Category 1
Category 2
> Category 3

I.e. items in Category 3 belong to Category 2 as well. (Formatting the list did not work as expected.)

If I want to create separate Content Templates for Categories 2 and Categories 3, how do I prevent GP Premium from displaying blocks belonging to both categories twice on the blog page and in the archives?

Hi there,

you could:

1. Create a Parent Content Template for your top level categories eg. Category 1 and Category 2.
Its display rules would be for Post Category Archives.

2. Now create a Content Template for Category 3 and use the Apply to: Term > Category 3. And set the Parent to the one you created in step 1.

When you use a Parent content template, GP will loop through all Children elements and apply the first one that meets the Apply to criteria. If it fails to find any it will apply the Parent.

Thanks, I will try this out and let you know how it went!

Keep us posted :)

This archived topic is closed to new replies.