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.
- Duplicated the
resources
Archive Layout
- Removed any unnecessary extra sections after duplication (e.g. top slider, etc.)
- Assigned the layout conditions as:
-
Post Type is Resource and Resource Type is Case Studies . . .
-
Post Type is Resource and Resource Type is Case Studies . . .
- Set the “Preview” to Resource Type and Case Studies:
- Clicked “View on Frontend”
#5
but 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.