Last active
August 29, 2015 14:18
-
-
Save crumina/a2871673b6333a80f910 to your computer and use it in GitHub Desktop.
[Onetouch] Modify post title
This file contains hidden or 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
<?php | |
function cr_custom_header_titles() { | |
if ( is_single() ) { ?> | |
<h1 class="entry-title"><?php the_title(); ?></h1> | |
<?php if ( function_exists( 'the_ratings' ) ) { | |
the_ratings(); | |
} | |
} else { ?> | |
<h1 class="entry-title"><a href="<?php the_permalink(); ?>" | |
title="<?php echo esc_attr( sprintf( __( '%s', 'crum' ), the_title_attribute( 'echo=0' ) ) ); ?>" | |
rel="bookmark"><?php the_title(); ?></a></h1> | |
<?php if ( function_exists( 'the_ratings' ) ) { | |
the_ratings(); | |
} | |
} | |
} | |
function _change_custom_post_title() { | |
remove_action( 'reactor_post_header', 'reactor_do_standard_header_titles', 2 ); | |
add_action( 'reactor_post_header', 'cr_custom_header_titles', 2 ); | |
} | |
add_action( 'init', '_change_custom_post_title', 1 ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
adding function for ratings plugin show