ACF, Taxonomies, Layouts

Hello,

I am using ACF to create a custom post type (Portfolio Projects).

In the Field Group, I’ve set up a taxonomy selection (Project Category) using the terms I’ve set up in the Post Categories.

I’m trying to set up an Archive Layout for the categories (Category Layout). I can get the category term to show up in the preview but none of the posts.

I’ve tried setting the layout conditions to Post Type > is > Project and Post Taxonomy > is > Category and neither one works.

This is what I get when I preview the layout: https://creativedesigns.mysites.io/category/commercial/restaurants/

I’m not sure what I’m missing at this point.

Thanks in advance.

Hey @zenzino,

Thanks for reaching out!

Your current condition Post Type > is > Project and Post Taxonomy > is > Category doesn’t work if there are no results and it relies on custom post type which it doesn’t have access to.

With that said, in your current setup, you can try the string condition category in {{dc:url:full_path}}

Hope that helps.

Thanks @marc_a

Why doesn’t it have access to a custom post type?

Is there a better way to have categories for a custom post type?

Hey @zenzino,

The reason it does not have access to your custom post type is that it is using global categories. With that said, if you wish to use your current condition, you can create your own custom Taxonomies specific for Portfolio Projects. Please check the documentation below on how to register a taxonomy using ACF.

Hope that helps.

Thanks @marc_a

Hey @zenzino,

You’re most welcome!

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