You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently wp-admin searches to attachments use Elasticsearch, so the index is in place, but using the stripped back code above does not and returns 0, does any global variable or wordpress element need including for it to work in this way?
Designs
No response
Describe alternatives you've considered
No response
Code of Conduct
I agree to follow this project's Code of Conduct
The text was updated successfully, but these errors were encountered:
Started this as a headless issue, but in further testing its actually the tax_query addition to the search query that's throwing this out and resulting 0 results, is there a way to combine the two or do i need to filter after search?
If you are sure ElasticPress is being loaded, that code should work, @jacobmasters. Is that image-association taxonomy indexable? If not, you may need to use the ep_sync_taxonomies filter to add it to the list.
It has been 3 days since more information was requested from you in this issue and we have not heard back. This issue is now marked as stale and will be closed in 3 days, but if you have more information to add then please comment and the issue will stay open.
Is your enhancement related to a problem? Please describe.
I've a simple external page which just includes the wp-config file and disables all themes/most plugins to just run a simple get_posts search:
<? define('WP_USE_THEMES', false); define('plugins-searchonly',true); require("../wp-config.php"); remove_filter('pre_get_posts', 'pre_get_filter'); $args = array('ep_integrate' => true,'posts_per_page' => -1,'post_type' => 'attachment','post_status' => 'any'); $args = array_merge( $args, array('s' => $_GET['search'])); $taxquery = array('tax_query' => array( array('taxonomy' => 'image-association','field' => 'slug', 'terms' => array('folio')))); $args = array_merge($args,$taxquery); $folios = get_posts($args) ; ?>
Currently wp-admin searches to attachments use Elasticsearch, so the index is in place, but using the stripped back code above does not and returns 0, does any global variable or wordpress element need including for it to work in this way?
Designs
No response
Describe alternatives you've considered
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: