Created
February 28, 2021 20:35
-
-
Save tripflex/b2cbf8b2c7a35d7736e048865276b2b3 to your computer and use it in GitHub Desktop.
Remove Taxonomy Ordering when using WP Job Manager Search and Filtering (native ordering)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
add_filter( 'search_and_filtering_get_taxonomy_data_options_args', 'smyles_sf_remove_tax_ordering' ); | |
function smyles_sf_remove_tax_ordering( $args ){ | |
if( isset( $args['order'] ) ){ | |
unset( $args['order'] ); | |
} | |
if ( isset( $args['orderby'] ) ) { | |
unset( $args['orderby'] ); | |
} | |
return $args; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Customizing sorting example:
https://gist.github.com/tripflex/52c89f87416068cfff5deb40a77bba06