Skip to content

Instantly share code, notes, and snippets.

@crumina
Last active August 29, 2015 14:18
Show Gist options
  • Save crumina/a2871673b6333a80f910 to your computer and use it in GitHub Desktop.
Save crumina/a2871673b6333a80f910 to your computer and use it in GitHub Desktop.
[Onetouch] Modify post title
<?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 );
@crumina
Copy link
Author

crumina commented Apr 9, 2015

adding function for ratings plugin show

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment