Dynamic Content - Query post taxonomies

Hello! I am attempting to list a post’s categories/tags via dynamic content. Specifically, I am trying to list a Portfolio’s Portfolio Categories. Here is the dynamic content I have started with, but have not be successful:

{{dc:query:query_var key="portfolio-category"}}

Ultimately, I want to use the slugs as custom CSS classes.

Hi @mediaryte,

Thank you for writing in, on your looper provider, use the Current Post Terms type and the taxonomy is Portfolio Categories

Then use {{dc:term:name}} to output category name on the looper consumer.

Hope it helps,
Cheers!

Thank you! I understand this logic and it does work as its own separate query. Is it possible to use this as a nested query? Example: I want to list posts, within the listed posts each post will list its terms. Is this possible? I am using your example as the nested query, but it appears to ignore the parent query.

Hi @mediaryte,

It would be great if you can show us a screenshot or diagram of the layout you want so that we can give you a recommendation on how you can achieve it.

Hope that helps.

Thank you.

Here is an image of the WIP - the looper is loading all portfolio items using the Posts element. Each portfolio item needs to list the terms it is assigned. Using the Posts element as the looper provider for all of the portfolio items, each as a Post element, how can another looper for the terms be used in the Post if it the looper consumer uses the parent query?

Orange outline = Posts element with the looper provider
Red outline = Post element as looper consumer

I imagine a separate element can be used for the nested query, but my goal is to use the terms as classes on the Post.

Hello @mediaryte,

You can activate the Looper Provider in the Post element that is the Looper Consumer at the moment. A nested query is possible. If nothing is helping, provide us access to your site so that we can check your settings. Please create a secure note 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

Best Regards.

Info shared on my previous reply.

Hi @mediaryte,

I have tried to check your website and found that plugin WordPress Store Locator and Pilotpress is the reason behind a few JavaScript error, which does not let the Builder loading and we are not able to check the issue in a proper way.

Can you please deactivate the said plugin and let us know it is ready to check once again. If that is not possible, please copy your live site to a staging server and give us access in the secure note including:

– WordPress Site URL & Login URL
– WordPress Admin username/password

To create a secure note, click the key icon underneath any of your posts.

Thanks

This is already development staging site - the plugins have been disabled and additional JS errors have been resolved.

Hello @mediaryte,

Back to your post taxonomies, you can simply use the {{dc:post:classes}} and {{dc:post:id_attribute}}.

Kindly let us know how it goes.

Yes, it worked. Thank you for the assistance!

Hi @mediaryte,

We’re glad that it is now working fine on your end! If you have any other concerns or clarifications regarding our theme features, feel free to open up a new thread.

Thank you.

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