Skip to content

Instantly share code, notes, and snippets.

@dryan1144
Created July 26, 2017 00:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dryan1144/c0b678f8a27c94ec39b8cf803f4b5093 to your computer and use it in GitHub Desktop.
Save dryan1144/c0b678f8a27c94ec39b8cf803f4b5093 to your computer and use it in GitHub Desktop.
Filter taxonomy term URLs for SF Pro
<?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