Created
July 26, 2017 00:13
-
-
Save dryan1144/c0b678f8a27c94ec39b8cf803f4b5093 to your computer and use it in GitHub Desktop.
Filter taxonomy term URLs for SF Pro
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 | |
function hck_filter_taxonomy_archives( $url, $sfid) { | |
if (is_tax('topics')) { | |
$slug = get_queried_object()->slug; | |
$url = site_url() .'/'. get_post_type() .'/'. $slug; | |
} | |
return $url; | |
} | |
add_filter( 'sf_results_url', 'hck_filter_taxonomy_archives', 10, 2 ); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment