Last active
August 29, 2015 14:18
-
-
Save nucklearproject/c4f845963bbeee624056 to your computer and use it in GitHub Desktop.
Reemplazar la url de una pagina por la categoria para SILO
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
function wpa_alter_cat_links( $termlink, $term, $taxonomy ){ | |
if( 'category' == $taxonomy && 0 == $term->parent ){ | |
return str_replace( '/category', '', $termlink ); | |
} | |
return $termlink; | |
} | |
add_filter( 'term_link', 'wpa_alter_cat_links', 10, 3 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment