Skip to content

Instantly share code, notes, and snippets.

@Luisoncm
Last active April 12, 2018 13:53
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 Luisoncm/ec146e791293cac2d5853fb1e127f2aa to your computer and use it in GitHub Desktop.
Save Luisoncm/ec146e791293cac2d5853fb1e127f2aa to your computer and use it in GitHub Desktop.
Get rid of the commas between tags
<?php
/* Don't paste me
*
*
* Modify the meta info on post footer
*/
add_filter( 'genesis_post_meta', 'lc_post_meta_filter' );
function lc_post_meta_filter( $post_meta ) {
// where do we apply the filter
if ( is_home() || is_front_page() || is_archive() || is_search() ) {
// and...the filter
$post_meta = '[post_categories before="Categorías: "]';
return $post_meta;
}
// On posts we get rid of the commas just in tags
elseif ( is_single() ) {
$post_meta = '[post_categories before="Categorías: "] [post_tags before="Etiquetas: " sep=""]';
return $post_meta;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment