Archive Page Layout for Specific Term of Custom Taxonomy of a Custom Post Type

I am currently refactoring our live site with the Pro theme and am running into a couple issues. I’ve scoured the forum for this solution before posting, so forgive me if this has been covered before.

Note: Direct links to pages noted with # will be in the Secure Note.

Using CPT UI, I have set up the following:

  • Post Type: resources
  • Taxonomy: resource_type
  • Term: case-study

The Goal…

  • Replicate our live site’s Case Studies page#1 on our refactored page #2
  • My guess is that this requires…
    • an Archive Layout
    • for the term case-study
    • from the custom taxonomy resource_type
    • associated with the custom post type resources.

Progress so far…

I was able to successfully create an Archive Layout for the custom post type resources #3
You can see how this mirrors the existing page on the live site #4

The Issue(s):

As you can see on the refactored Case Studies page #2 I attempted to use a Looper Provider of Query String and used post_type=resources&tax_query[0][taxonomy]=resource_type&tax_query[0][field]=slug&tax_query[0][terms]=case-study.

While this does pull the correct posts which would appear on a correctly setup archive layout page… I cannot use this approach since I won’t be able to use the “Filter Everything” plugin to filter posts, nor can I use pagination – both of which are essential to properly replicate the live site.

I recognize using a Looper Provider with a Query String is probably not the way to go, but I left it in place just as a proof-of-concept to show both what I’ve tried, and how the expected result should look, with this page showing the posts.

My failed attempt…

I am unable to get an archive setup to display how I have it with the aforementioned query string. Here are the steps I’ve taken to attempt it.

  1. Duplicated the resources Archive Layout
    image
  2. Removed any unnecessary extra sections after duplication (e.g. top slider, etc.)
  3. Assigned the layout conditions as:
    • Post Type   is   Resource   and   Resource Type   is   Case Studies . . .
      image
  4. Set the “Preview”  to   Resource Type   and   Case Studies:
    image
  5. Clicked “View on Frontend” #5but was immediately redirected to the homepage.

My guess is this is a simple fix, and I’m overlooking something… but I have no idea what.

Please help me Themeco Staff, you’re my only hope.

Hello @sfreeman,

Thanks for writing to us.

I would suggest you please set the layout with the “OR” operator instead of the “AND” operator. Please have a look at the given screenshot below for reference.
Untitled-Archive-Layout-Archive-Layout-Cornerstone

In case you have not seen the doc of the assignment and condition please have a look at it.

Thanks

@prakash_s - changing this did not help anything. When clicking the page preview, it still directs me to the homepage.

I believe I solved the issue! Posting the solution in case anyone else runs into this issue, too.

This needs to be enabled within the settings of the custom taxonomy for it to be viewable.

"public" => true,
"publicly_queryable" => true,

Very much a duh moment :man_facepalming:.

Hello @sfreeman,

Glad to know that things are well with you.

Thanks

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