ACF Custom Post Type Issues with Archive page when Category is selected

Hello,

I was able to get the ACF Custom Post type for “Employee” to display in one of the provided archive templates. I also configured the ACF Custom Post Type to have an Archive URL for “/staff”. This all worked.

What I am looking to achieve is a category filter (I have added one on the page for “location”) to limit the posts to which ones have the selected category.

For example, “/staff/category/location/calgary” but right no it just goes to “/category/location/calgary” and shows a 404 since the archive is ignored. I need some help with how to structure the permalinks and categories so I can achieve the “/staff/category/location/calgary” archive displaying only the custom posts with this category.

Here is the archive page: https://mauricelaw.wpenginepowered.com/staff/

Hello @Rough_Works_Consulting,

Thanks for writing in! What you are looking for is not just a filter. You are trying to set up a custom permalink for the category archive of your custom post type. This is beyond the scope of your support. Be advised that our support covers only getting your site set up, minor cosmetic changes, and bug fixes. What you have in mind is not even a WordPress default or standards. It would require custom modifications. Perhaps these articles will help you understand how WordPress permalinks work and how you can modify it.

Best Regards.

Hey @ruenel

Thanks for the two articles. For those curious I found a very easy way for it to work with the existing archive structure. The issue was that the taxonomies were under the general categories for the wp and not the custom taxonomy structure provided by ACF, here are the steps to fix this:

  1. Build a ACF Taxonomy and associate it to the Unique Posts Type created.
  2. Create all your categories or tags
  3. Filter by custom taxonomy on the archive page for the custom post type (you must turn on the option to include the custom post type in the archives* inside the ACF Advanced Settings)

Hopefully this helps someone else in the Themeco Community.

Hey @Rough_Works_Consulting,

Thanks for sharing your ideas, we really appreciate it.

Cheers!

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