Forums › Forums › Search & Filter Pro › Content on posts, filter on pages
Tagged: WP_Query
- This topic has 3 replies, 2 voices, and was last updated 7 years, 1 month ago by Trevor.
-
Anonymous(Private) October 3, 2017 at 7:51 am #134461
Hello.
I have more than 2000 posts in category. Each post have more than 20 options in custom fields – price, size, etc.
Now i can filter them, using sub-categories by creating filter for each options combination, for example:
category/green-l/.
It is a bad decision, because i need to import posts to each combination category, it tooks a lot of time (an hour for each import). And i need to create custom category template and filter for each category.What i am tryind to do:
-Keep products in posts.
-Create page template using wp_query to get only products i need (for example, custom field ‘price’ from 10 to 100). Using that page template create 50 pages with different price
-Create filter for this page templpate without ‘price’ fieldBut i have a problem with Display results method. Which one i must choose to display in filter results only posts received by wp_query conditions on page template? Now after filtering i get all 2000+ posts.
Trevor(Private) October 3, 2017 at 9:52 am #134482The only way to do this would be to let Search & Filter do the WP Query by using either The Shortcode or Custom methods (which require that the form is attached to a single pre-existing page), and that means creating one form per page, and then use the filter options in the form to pre-filter the page. I have done this one one site I have made.
-
AuthorPosts