so what i am trying to do is:
when you click on a category, tag, or search for a term, i want the results page to have a ‘featured posts’ section at the top, that is unique to that results page.
i created a layout on tagdiv and applied it globally, and found that whenever i edit the ‘featured posts’ posts loop element, it would apply the changes to all results pages.
so instead i created a duplicate of my global template, and planned to apply that to the categories that i want a unique featured posts section for, and my global template can just apply to all other generic categories, with generic featured posts.
as far as i can see, to have a unique section on each one, id need to create a duplicate template for each category/tag, and then add that as necessary to each results page? however this could become messy if i do it for tags too, as there could be so many tags that id have a crazy number of duplicate templates.
is there no way of applying one template to all categories and tags, and then just editing the filter on the featuring post loop for that specific page… and it not applying globally?
thanks
Hello!
Yes. We have some special filters that will apply depending on the page you are on: https://app.screencast.com/BjL89PWCkwePU -> https://forum.tagdiv.com/flex-block-settings-guide/
Or you can choose a post loop element, and the filter will apply automatically.
Thank you!
hi,
sorry im a bit confused. the screenshot says ‘you should place the shortcode in x template). what does this mean? what shortcode?
I’m really confused. i know how to set the filter to eg the current category that the element is built in, however it always seems to make that filter universal across all categories.
im not sure if i described the situation well.
so basically i have category X and category Y.
when you visit eg the category page for category X, i have a ‘big grid flex 1’ at the top of the page that is set to show 5 specified posts for category X, and then underneath that i have a posts loop to show the remaining posts for that category.
I want to do the same for category Y, – so i want 5 specified category Y posts in the big grid flex at the top, and then the remaining category Y posts in the posts loop below.
the posts loops are working fine and are only showing posts from the correct category, however the big grid flex and the title at the top (the title being ‘FEATURED CATEGORY X/Y) are the same on both categories, and if i change one, it changes on all categories to be identical.
Hello!
A shortcode means the element Flex block or Posts Loop from the TagDiv Composer.
So, the element Flex block with a special filter, for example, the current category, will dynamically display the posts from the current category depending on which one you are in. So, you need to add a flex block with that filter in the category template once, and it will display the posts for each category if you have the same category template assigned to your categories.
You can use a flex block with a special filter instead of a big grid. Set an offset to the posts loop of how many posts display the previous element, the flex block.
Thank you!
hi bettina,
the problem we are having is that i am trying to hand pick the featured ones for each category so i cant simply set it to displau current category in the filter section of the flex block.
and what is happening is that when i edit the ‘featured’ flex block in category X to display eg posts 175, 176, it edits the category cloud template to display 175 and 176 in the featured flex block on all tag pages that are using that cloud template.
what i need to be able to do is hand pick the featured posts for each tag and category.
it is also doing it for the page title. I’ve inserted a title element into the category/tag cloud template, but when i eg change it to display ‘Featured X’, it changes that in the cloud template too so now if i go on category Y, the title also displays ‘Featured X’ instead of ‘Featured Y’
Hello!
Unfortunately, you cannot apply two filters there. You can apply only in a sorted order.
Yes, the title is not dynamic for each category. You should then have a different template for each category. You can duplicate the template, give it another name as a new one, make the changes you want for the title, and assign it to the category with the same name.
Thank you!