Display posts list by tag asociated with current custom post

Hello!
I have custom post type “hex” and want to display list of posts with specific tag inside custom post page. Custom post is taggeg with this tag too.

This task is like displaying similar posts by tag. Ufortunately I can’t figure it out…

Hey @bolvinov,

Thanks for writing in! To display the posts with the specific tag, you will need to change the Looper Provider of the Post Lists element. You will have to use Query Builder instead.

Please check out this documentation first:

Hope this helps.

But tag is different in different “hex” posts. In your example in all “hex” posts tag will be the same “Accessories”. How to make it dynamic, for example, depending on tag of “hex” post?

Hi @bolvinov,

As I have understand your questions, you want to display posts with the same tags in the custom post page, right?

If yes, my colleague suggestion was correct. Just change the the Post to Hex in the Posts field then select the tag name in the Taxonomies fields. If not, would you mind sharing more information about your concerns?

Hope that helps.

Thank you.

Hi!
I have custom post “hex” page on which I have to display the list of ordinary posts.
This list acts like “Related posts”: ordinary posts are selected by tag. This tag belongs to concrete “hex” custom post. So every hex-post has its own tag, and I can not choose what tag it should be in Query builder.

Is there a way to build a query which takes current custom post tag and then builds a list of ordinary posts by this tag?

Hello @bolvinov,

You can select the Looper Type as “Query String”—>now add the enter you tag name in the WP_Query. For example tag=tag_name

Front-Page-Content-X (2)

Please have a look at this article to learn more about query parameter

Please have a look at our doc to learn more about Query String https://theme.co/docs/loopers#query-string

Regretfully there is no option to get the current post tag dynamically.

Thanks for understanding

Ok, thank you! I think that I already came across similar issiue. Could I leave it as feature request?

Hey @bolvinov,

We certainly appreciate the feedback! This is something we can add to our list of feature requests. This way it can be taken into consideration for future development. All of these items are discussed with our team internally and prioritized based on the amount of interest a particular feature might receive.

Thanks!

Anyway thank you a lot! You are doing a great job! Loopers and layouts make things much more easier, it substitute 2 plugins for me already

You are most welcome.

Sorry to bother but, what is the operation to define not equal, is it “!=” ?

Hello @armandogomez,

You cannot use != in the query. For more details, please check out this full documentation instead:

Best Regards.

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