Created
September 11, 2017 06:14
-
-
Save anonymous/234400fe8d671bcffd9ef63473b2cf03 to your computer and use it in GitHub Desktop.
This file contains 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
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