Filter Posts by All and Show All

I’ve created a looper that allows for filtering. The looper can be seen here. I’ve got 2 problems I’m trying to resolve:

  1. How do I display all posts to begin with? Right now this is my query string post_type=programs&tax_query%5B0%5D%5Btaxonomy%5D={{dc:url:param key="taxonomy" fallback="program_grades"}}&tax_query%5B0%5D%5Bfield%5D=slug&tax_query%5B0%5D%5Bterms%5D={{dc:url:param key="program-terms" fallback="grades-9-12"}} and its only pulling up Grades 9-12 posts.
  2. When a user selects “All” from the “Filter by Grade” dropdown. It’s not displaying all posts. How do I get the filter button “All” to display all posts. Currently, the “All” filter is set to this url ?orderby=title&order=asc

Hi @santosfel5,

Thanks for reaching out!

You can check this video on how you can set up a filter or sorting functionality.

Hope that helps.

Sorry, that video does not help. I used that video to create my filters in the first place. He does not go into a display-all solution when you are filtering by a tag.

Hey @santosfel5,

  1. You are seeing all Grades 9-12 posts because that’s what you’ve set in the fallback. It sound’s like you don’t have a filter yet or the filter setup is incorrect that’s why you get the fallback.

  1. The keys in your query are taxonomy and program-terms. That’s what you should use in the filter like ?taxonomy=program_grades&program-terms=grades-1-5. Please don’t copy that as it’s just an example.

If that still doesn’t work, please provide the following info in a Secure Note so we could check your actual setup and give the proper advice.

  • URL of the page where we could see the issue
  • WordPress Login URL
  • Admin username and password

You can find the Secure Note button at the bottom of your posts.

Thanks.

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