Skip to content

Instantly share code, notes, and snippets.

@krogsgard
Last active December 15, 2015 03:49
Show Gist options
  • Save krogsgard/5197138 to your computer and use it in GitHub Desktop.
Save krogsgard/5197138 to your computer and use it in GitHub Desktop.
Filter byline w/ Hybrid Core
<?php
/* filter byline in hybrid core themes that utilize one
*
* Change "inforock" to your own textdomain for your theme
* Use shortcodes as shown for various byline info
* More available shortcodes can be found in Hybrid Core docs
*/
add_filter( "{$prefix}_byline", 'krogsgard_alter_byline' );
function krogsgard_alter_byline( $byline ) {
$current_post_type = get_post_type();
$check_types = array ( 'product', 'page' );
if ( in_array( $current_post_type, $check_types ) ) {
$byline = '';
} else {
$byline = '<div class="byline">' . __( '[entry-published] [entry-terms taxonomy="category" before=" | "] [entry-comments-link before=" | "] [entry-edit-link before=" | "]', 'inforock' ) . '</div>';
}
return $byline;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment