Timeline for Get all post IDs from current WP_Query - not just currently visible
Current License: CC BY-SA 4.0
10 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jan 4, 2022 at 13:53 | answer | added | amarinediary | timeline score: 0 | |
Dec 25, 2021 at 10:02 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Aug 26, 2021 at 9:01 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Nov 18, 2019 at 12:48 | answer | added | Joe | timeline score: 2 | |
Dec 18, 2018 at 14:07 | comment | added | Milo | The current query is the same as the current page, you need a new query with different paged / posts_per_page values | |
Dec 18, 2018 at 11:46 | comment | added | Gary Swift | I know how to filter the products. I am by hooking into ‘woocommerce_product_query’ (hookr.io/actions/woocommerce_product_query) and modifying the query. This is not what I am trying to do here at this stage. I want to use the post IDs of the current query to get all terms (product_tag) related to the current query. The get_terms function accepts an array of IDs to do this ($args["object_ids”]). I’m just wondering if there is a way to get all IDs of the current query. | |
Dec 18, 2018 at 11:11 | comment | added | Jacob Peattie | WooCommerce that sort of filtering built in. Use attributes on your products and you can filter with those. | |
Dec 18, 2018 at 10:23 | comment | added | Gary Swift | My end goal is to build a taxonomy filter. I want to use the post IDs from the main query to do a taxonomy look up. The post IDs array I get will be used in the args for a get_terms() request. | |
Dec 18, 2018 at 10:10 | comment | added | Jacob Peattie | What exactly are you trying to do? I'm not sure what you'd need the IDs of all the posts to do. Your example is regarding the total number of posts/products per page, which you wouldn't need the IDs for. | |
Dec 18, 2018 at 10:02 | history | asked | Gary Swift | CC BY-SA 4.0 |