rank math fields for product not working
- BodavParticipant3 years, 5 months ago #27848
hello
i am trying to sort the product by rankmath fields, i syncted them all as custom fields, tried both as text sortable and text not sortable but the query outputs all the products and i cant sort by keyword
https://snipboard.io/PoVBEr.jpgalso, in elementor, when i add new image (media is syncted with index), the images are shown there without any sort or date relevance..but in the wp admin they show fine
wpsolrKeymaster3 years, 5 months ago #27853WPSOLR provides a hook to deactivate itself in admin search:
add_action( WPSOLR_Events::WPSOLR_FILTER_IS_REPLACE_ADMIN_POST_TYPE_BY_WPSOLR_QUERY, [ $this, 'wpsolr_filter_is_replace_admin_post_type_by_wpsolr_query', ], 99, 1 ); public function wpsolr_filter_is_replace_admin_post_type_by_wpsolr_query( $is_replace_by_wpsolr_query ) { $result = $is_replace_by_wpsolr_query && !( condition here on your url parameters or anything you want); return $result; }
wpsolrKeymaster3 years, 5 months ago #27854You can inspire from wpsolr-pro/wpsolr/core/classes/extensions/premium/class-wpsolr-option-premium.php to eventually filter your own admin fields:
add_action( WPSOLR_Events::WPSOLR_ACTION_SOLARIUM_QUERY, [$this,’wpsolr_action_query’,], 10, 1 );
public function wpsolr_action_query( $parameters ) {
…
}
You must be logged in to reply to this topic.