Skip to content

Instantly share code, notes, and snippets.

Created September 11, 2017 06:14
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 anonymous/234400fe8d671bcffd9ef63473b2cf03 to your computer and use it in GitHub Desktop.
Save anonymous/234400fe8d671bcffd9ef63473b2cf03 to your computer and use it in GitHub Desktop.
function graduate_title_as_per_template() {
if ( is_singular() ) {
the_title();
} elseif( is_404() ) {
esc_html_e( '404', 'graduate' );
} elseif( is_search() ){
printf( esc_html__( 'Search Result for: %s', 'graduate' ), get_search_query() );
} elseif ( is_archive() ) {
if ( class_exists( 'WooCommerce' ) && is_shop() )
woocommerce_page_title();
else
the_archive_title();
} elseif ( is_home() ) {
esc_html_e( 'Browse', 'graduate' );
}
}
/**
* pagination.
*
* @since Graduate 0.1
*/
function graduate_pagination() {
$options = graduate_get_theme_options();
if ( true == $options['pagination_enable'] ) {
$pagination = $options['pagination_type'];
if ( $pagination == 'default' ) :
$args = array(
'prev_text' => __('More..', 'graduate'),
);
the_posts_navigation($args);
endif;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment