Struggling to get conditional logic with post categories to not display

Hi Team, I have been grinding on this issue for several days and hours. The conditions I have set to only display specific categories and even tried authors do not appear to restrict the posts being presented.

Can you take a quick look and see what I am doing wrong.

Hello Rob,

Thanks for writing in!

Your conditions are:

Blog is being viewed AND
Specific is NOT Andrew...

OR Post Category is NOT Thailand News

This means that the News Layout

  • will be used in all category archive pages EXCEPT for the Thailand News category
  • will be used in the blog index were the Author is NOT Andrew.

Please be advised that in an archive layout, you do not need to have a Looper Provider so that the correct post items related to that category will be displayed.

Best Regards.

Hi Ruenel, there has to be something else I have not set up correctly. I have switched off the Looper Provider as well on this archive page. And yet the “Thailand news” post is still showing up. The desired output is that we have two news pages, so I have set up a Thailand News Archive and will assign this to a new page. I want to ensure that I am at least getting the conditions right not to show the Thailand posts before we commission Andrew to write more posts. Have a look at the attached. Can you see anything wrong? (note: I have now unpublished this specific post to remove it from the news feed)

Hey Rob,

Is the “News” archive layout the layout for your blog index? Do you want to exclude all “Thailand News” post items from your blog index? If that is the case, adding those conditions is incorrect. You will have to modify the query instead. Please check out this article:

If this “News” archive layout is for your blog index and all other category and you have another custom archive layout intended for the Thailand News category, the condition must be this:

Blog is being viewed AND
Specific is NOT Andrew...

OR Post Category is NOT Thailand News

To better assist you with your issue, please provide with us your WP Access so that we can check your layout. You can create a secure note in your next reply with the following info:
– Link to your site
– WP login URL
– WP username
– WP password
– WP Administrator Role
– Confirmation that we can access and make changes to your site

To know how to create a secure note, please check this out: How The Forum Works

image

Best Regards.

Hi Ruenel, thank you for the links I went through it. Essentially we require two news pages or sections in the blog if that works too. One for all the categories excluding Thailand News. And another page (or section in the blog if this is more effective) to present all the posts from our Thailand Team. Ive added the secure note. Thank you

Hey Rob,

I’ve checked your website news page and I don’t see any Thailand news category anymore. That being said, I suspect that you have already fixed the issue, if not, please let us know.

Thank you.

Hi Marc, no, unfortunately, it’s not working. I have unpublished the Thailand Post so it does not display on the news feed.

Hey Rob,

I’m sorry I’m confused about what you’re discussing with my colleagues let’s please solve one area at a time.

The Archive Layout Settings > Assignment > Conditions cannot exclude posts in your news feed (Column 1 Looper Provider) because it’s for assigning the layout.

The Condition that can exclude posts is the Element Condition. You set a Condition of the Looper Consumer which is the Column 1 Post element. For example, choose a String Condition and set it to {{dc:term:name}} IS or IS NOT Article. In that case, the Condition will only show (IS) or exclude (IS NOT) the posts which has a Term Name of Article. You can change it to other term name.

image

image

1 Like

Hi Christian, this is it!!! Huge thank you.

Hi Rob,

Glad that we are able to help you.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.