Single Layout Not Assigning + Custom Taxonomy in Looper

Hi folks,

I’ve got a Single Layout that I’m trying to assign to all Single posts in my Custom Post Type. I’ve got another Single layout that works great (‘Team Member’) but ‘Campaigns’—for whatever reason—will not fire. Is there something in my Custom Post Type build that needs to be set? Never had this issue before—I’m assuming something dumb that I’m missing.

Second question: as you’ll see in my layout, I’m using a ACF Taxonomy field to filter a Posts element via a Query String. When I’m querying standard posts, no problemo:

cat={{dc:acf:post_field field="press_category"}}&post_type=post&posts_per_page=3&offset=0&ignore_sticky_posts=1

When I’m querying the Custom Post (that has a Custom Taxonomy), I get nada:

cat={{dc:acf:post_field field="volunteers"}}&post_type=team&posts_per_page=12&offset=0&ignore_sticky_posts=1

Does ‘cat’ not hook into a Custom Taxonomy? Do you need to use ‘taxonomy=’? If so, can I use the ACF taxonomy selector to output the slug rather than the ID?

Credentials for the site are attached in a secure note! Thanks for all your help

Hi @lukefinsaas,

Thanks for reaching out.
The issue is due to the cache, I went ahead and cleared all types of cache, and no the Layout is working with the Campaign post types.

In the case of Custom Post Type you need to use the exact taxonomy like team_categories in place of cat.

Hope it helps.
Thanks

Bizarre! I thought I’d cleared the cache… well, looks good now!

So, I tried the below code without luck:

team_categories={{dc:acf:post_field field="volunteers"}}&post_type=team&posts_per_page=12&offset=0&ignore_sticky_posts=1

I’m guessing that team_categories is looking for the slug? I’d love to be able to use the ACF taxonomy.

Do I need to set ACF to output the Term Object, rather than ID? (and then loop over the top?)

Hi @lukefinsaas,

Would you mind explaining further what you are trying to achieve? just let us know the workflow so that we can help you with your layout.

Thank you.

For sure.

I’m looking to let end users select a Team Member Taxonomy in ACF. I can then pull through the taxonomy and output all assigned Team Members.

Basically, I don’t know what the campaigns will be in the future, or what future taxonomies will be, so I want to make it a dynamic field that they can select.

Does that make sense? I’m wrapping up for today but can provide more detail if needed! Appreciate your help

Hi @lukefinsaas,

The user can select the Team Member taxonomies using the ACF, and you can get the Team Members assigned to those taxonomies. I would suggest you go through the following thread, which may be helpful on this.


And on the other part, can you please explain what exactly you are trying to mean by saying future taxonomies for the Campaign?

Thanks

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