Blocks on homepage: filter by td_primary_cat

Posted in: Newspaper
Post count: 9

Hi,
posts are related to one or many categories but with only one primary category. On Category’s pages we want to display all articles whose one of their categories matches the displayed Category. But on the homepage, to avoid displaying same posts many times, we would like to display category blocks, where posts filtering is based on primary category (td_primary_cat as saved into postmeta). Is it possible to achieve that?
Thx in advance!

Post count: 22421

Hello,
Unfortunately there is no option for the blocks to display only the parent category in the theme panel. This can only be done by altering the theme files. you can remove this code: http://screencast.com/t/LJxjF3avnJ and now the blocks will pick up only the posts that have the category set as primary. (you will have to filter the specific category in block settings)
However there is an alternative to this which is called the ‘unique articles’ option: https://forum.tagdiv.com/unique-articles/ or you can use offsets: https://forum.tagdiv.com/offset-feature/
I hope this helps.
Thank you!

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