Problem with category templates

Posted in: Newspaper
Post count: 30

I have a problem with the category template.

In my site categories are used by two post types (Post and News).

In a specific category template I have planned that these two post types are in separate blocks, but for some reason the block that should only show “post” also shows news.

You can check the problem on this page: https://www.mrw.it/hosting/

The first block (on a blue background) should only show 3 post type contents => IT WORKS

The second block with a light gray background should show 9 news type contents with ajax pagination => IT WORKS

The third block should only show post type contents => IT DOESN’T WORK because it also shows news!

Can you help me?

Post count: 30

I think it’s a bug in your theme. There’s no way to make the block understand to show only posts (and not news).

ps: obviously I specified the value “post” in the post_type field to show

Post count: 27744

Hello,

We do not recommend setting two posts loop on the same page/template because most of the settings from the first loop element will be inherited for the second one.
For flex block, you should choose the current category“: Category – Current category ”special filter: https://forum.tagdiv.com/flex-block-settings-guide/

Thank you!

Post count: 30

This is a really big problem for us.

Categories are shared by different post_types and we don’t want different types of content to mix inside the same loop.

It is essential for us to have different loops, each with a specific post_type

How can we solve this problem? Is there any way or do we have to evaluate another theme?

Post count: 30

Ah, I see what you mean.

Instead of using two loops use a Flex Block and 1 loop. Right?

OK so it seems to work.

I have a question: how do I remove the link on the right in the title (block header 12). See this link: https://postimg.cc/Hcmh0M3n

Thank you

Post count: 27744

Hello,

Yes, use one posts loop and how many flex blocks you want.
You can hide it with a custom code CSS, or change the block header type.

Thank you!

Post count: 30

OK, I solved it following your suggestion. Thanks.

But now I have another problem: I created different templates for the categories but I can’t assign them anymore.

Let me explain better:

– I created 3 different category templates
– I enter category “X” and try to assign a certain type of template by clicking on the appropriate link
– the page reloads but the template hasn’t changed

Until yesterday everything was working correctly. Could this problem be due to the update to the new version of Newspaper?

Post count: 27744

Hello,

Yes, there seems to be an issue with this option to assign the template from the front end.
You can assign a category template here in the theme panel for each category -> https://i.imgur.com/ztKi5ZS.png

Thank you!

Post count: 30

OK that works. Thank you so much Anamaria!

Viewing 9 posts - 1 through 9 (of 9 total)
The forum ‘Newspaper’ is closed to new topics and replies.