Create index for own custom data in elasticpress from wordpress plugin
Create index for own custom data in elasticpress from wordpress plugin
Create index for own custom data in elasticpress from wordpress plugin
Found out my solution by filtering the search query. Hope that helps: function new_search_join( $join ) { global $wpdb; if ( is_search() ) { $join .= ” INNER JOIN {$wpdb->term_relationships} ON {$wpdb->posts}.ID = {$wpdb->term_relationships}.object_id INNER JOIN {$wpdb->term_taxonomy} ON {$wpdb->term_taxonomy}.term_taxonomy_id = {$wpdb->term_relationships}.term_taxonomy_id INNER JOIN {$wpdb->terms} ON {$wpdb->terms}.term_id = {$wpdb->term_taxonomy}.term_id”; } return $join; } add_filter(‘posts_join’, ‘new_search_join’ ); … Read more
Finally able to find out a working solution. The inner join has to join term_taxonomy (where we find the term) to icl_translations with current language. And then from icl_translation to the origin language to get the element_id that then this element_id to term_relationships (where all the product from the origin product_cat are listed). If that … Read more
Fix Custom Post Type not appearing in search results?
Display posts based on the selected category when no subcategory is chosen
It seems you have hardcoded your pageNumber as 1 always. var pageNumbers = 1; So every time you click on “Load More” this value will be incrementing even if you are searching for new term. My approach would be to store the pageNumber value in “Load More” button. <button data-pageNumber=”1″ id=”load-more”>Load More</button> And when you … Read more
How to add CPT in Elementor pro search template
You could try something like this below. Basically, if we are performing a search and it is the main_query (the query that generates the page results) ignore the default search and perform an exact match via the query_where function custom_product_search_exact_match( $query ) { global $wpdb; if ( is_search() && is_main_query() && !empty( $query->query_vars[‘s’] ) ) … Read more
Autocomplete search field that is feed by a taxonomy from custom post type?
Query posts which are related via postmeta