Hi everyone,
I’m currently working on a FAQ system in WordPress using Loops and Logic, and I need some guidance to accomplish my goal. The system is built with a custom post type and two custom taxonomies, and while I have some functionality working, I’m struggling with implementing a specific query to filter the posts as needed.
My web page is located here:
Project Overview:
- Custom Post Type:
loan-faq
- Taxonomy 1:
faq-topic
(topics like “Auto Loan FAQs”, “Used Car Loan FAQs”) - Taxonomy 2**:
faq-type
(question types likefaq
,saq
,maq
)
My Goal:
I need to display FAQ posts on a taxonomy archive page filtered by:
- The current faq-topic term (based on the taxonomy archive page I’m viewing).
- The faq-type taxonomy to show only posts tagged with the faq term (or saq/maq in other sections).
Current Working Setup:
I have the accordion structure working for the FAQ section using this snippet:
The Issue:
I need to modify the query so that:
- It filters posts by the current
faq-topic
taxonomy term (from the taxonomy archive page). - It also filters posts by the
faq-type
taxonomy term (specificallyfaq
for one section, and latersaq
andmaq
for other sections).
What I Tried:
I attempted the following query, but it’s not filtering as expected:
What I Need Help With:
- How can I properly filter posts based on both the current faq-topic term and the faq-type term?
- Is there a better approach to handling multiple taxonomy filters in Loops and Logic?
- Do you have any suggestions on how to optimize or improve this setup?
Thanks in advance for any help or insight the community can provide!