Skip to content

Instantly share code, notes, and snippets.

@jamiemitchell
Forked from wpsmith/visual-subtitle.php
Created October 15, 2013 06:11
Show Gist options
  • Select an option

  • Save jamiemitchell/6987240 to your computer and use it in GitHub Desktop.

Select an option

Save jamiemitchell/6987240 to your computer and use it in GitHub Desktop.
<?php
// Remove Visual_Subtitle filter
remove_filter( 'the_title', array( Visual_Subtitle::$instance, 'filter' ) );
add_action( 'genesis_after_post_title', 'wps_subtitle' );
/**
* Adds the subtitle to genesis_after_post_title.
* No need to rebuild admin portion since WP doesn't recognize it anyways.
*/
function wps_subtitle() {
global $post;
$subtitle = get_post_meta( $post->ID, '_visual-subtitle', true );
if ( ! $subtitle ) return $title;
if ( class_exists( 'Visual_Subtitle' ) )
echo '<span class="subtitle test">' . $subtitle . '</span>';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment