Dynamic content: how to display only a specific category/term when it is assigned to a blog post?

Hi staff!

Here is my situation;
I have several blog post which have assigned different category’s.
On certain places thru out the site I want to display specific category’s,
only if they are assigned to the blog post.

On the blog page I have set a column;
with a looper provider = Query builder
where in I exclude all the terms except for the one I want to be shown…

But you guessed it, somehow this doesn’t work.

Please help? tnx!

Hello @MeesterOntwerpers,

Thanks for writing to us.

I checked your given site URL it seems that the 1st URL is a single post URL where you have not added any looper. I went ahead and checked your 2nd URL it seems that it is displaying correct posts filtered by the specific category. Please have a look at the given screenshot in the secure note.

If you are pointing to something else please let us know.

Thanks

Thanks, unfortunately it’s not what i mean, see note, hope you can help…

Hello @MeesterOntwerpers,

Please note if you are trying to filter the posts by excluding the category you would have to add all the available categories except the categories post you want to display. I would suggest you, please use the include option to include the category it would filter the post by specific category, you can include multiple categories as well.

Thanks

Hello @prakash_s,

Unfortunately what you are suggesting does not solve the issue,
I’ve tried that before and again after your remark here, but nonetheless.

Could you please have a look at it once more?

Hello @MeesterOntwerpers,

You only need to use the “Current Post Terms” in your Looper Provider.

Screen Shot 2022-03-17 at 10.15.31 AM

This should display all the current post category assign to the current post that is displayed in your slide. Disabling the offset will display all of those categories.

Hope this makes sense.

Hi @ruenel,

Thanks for your reaction, but this is not the solution what I’m asking for. :upside_down_face:

I have 9 category’s, I want to be able to:
A. display one specific term category, if the post has dedicated that category
B. display all term category’s accept for two of them, if the post has dedicated category’s.

For example;

  • I have a Blog post named “Stanley”,
    has the following category’s: category 1, category 2, category 6 and category 7.

  • and Blog post named “Giorgio”,
    has the following category’s: category 3, category 4, category 5 and category 7.

Then on a webpage, thru using the Looper Provider,
option A: display the specific term category 2.

  • Blog post named “Stanley” has category 2, so ONLY that term will be visible.
  • Blog post named “Giorgio” has NOT category 2, so there will be NO Terms visible.

And on an other place/page option B,
display all term category’s accept for category 1 and category 2.

  • Blog post named “Stanley” has category 1, category 2, category 6 and category 7
    so the outcome here ONLY category 6 and category 7 term will be visible

  • Blog post named “Giorgio” has category 3, category 4, category 5 and category 7
    so the outcome here ONLY category 3, category 4, category 5 and category 7 term will be visible

Please tell me you understand what I’m trying to get at,
I’m real desperate here :pensive:

Hi, excluding all unwanted category’s doesn’t work…

Hello @MeesterOntwerpers,

This is your Slider layout:

You are using Looper Provider Query Builder with this settings:

This means that the post items under the gastspreker category will be displayed and be consumed in each slides. Using the {{dc:term:name}} dynamic content, you will be able to display the gastspreker as the category name.

If you go to Posts > All Posts and filter out the post items under the gastspreker category, you’ll have this:

Now, we go back to the screenshot above, your slider is displaying all the correct items with the category name below it. Only the option A is possible. The Option B that you want may be possible with custom development which is outside the scope of our support already.

Hope this makes sense.

Thanks, is it possible by using Conditions to make Option B possible?

Hello @MeesterOntwerpers,

Regretfully Option B goes beyond just by using a condition. It will require comparison query which will only be possible with custom development.

Thank you for your understanding.

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