', $after = ' ' ) {
if( is_archive() )
{
if ( is_category() ) {
$title = sprintf( __( 'Category: %s', 'becorp' ), '' . single_cat_title( '', false ) . ' ' );
} elseif ( is_tag() ) {
$title = sprintf( __( 'Tag: %s', 'becorp' ), '' . single_tag_title( '', false ) . ' ' );
} elseif ( is_author() ) {
$title = sprintf( __( 'Author: %s', 'becorp' ), '' . get_the_author() . ' ' );
} elseif ( is_year() ) {
$title = sprintf( __( 'Year: %s', 'becorp' ), get_the_date( _x( 'Y', 'yearly archives date format', 'becorp' ) ) );
} elseif ( is_month() ) {
$title = sprintf( __( 'Month: %s', 'becorp' ), get_the_date( _x( 'F Y', 'monthly archives date format', 'becorp' ) ) );
} elseif ( is_day() ) {
$title = sprintf( __( 'Day: %s', 'becorp' ), get_the_date( _x( 'F j, Y', 'daily archives date format', 'becorp' ) ) );
} elseif ( is_post_type_archive() ) {
$title = sprintf( __( 'Archives: %s', 'becorp' ), post_type_archive_title( '', false ) );
}
} elseif( is_search() )
{
$title = sprintf( __( 'Search Results for : %s', 'becorp' ), get_search_query() );
}
elseif( is_author() )
{
$title = sprintf( __( 'Author: %s', 'becorp' ), get_the_author() );
}
elseif( is_404() )
{
$title = sprintf( __( 'Error 404 : Page Not Found', 'becorp' ) );
}
else
{
echo '
'.get_the_title().' ';
}
/**
* Filter the archive title.
*
* @param string $title Archive title to be displayed.
*/
//$title = apply_filters( 'get_the_archive_title', $title );
if ( ! empty( $title ) ) {
echo $before . $title . $after;
}
}
endif;
// Site Footer Function
// Contains the closing of the #content div and all content after
function becorp_wp_footer () { ?>
post_parent ) : get_adjacent_post( false, '', true );
$next = get_adjacent_post( false, '', false );
if ( ! $next && ! $previous )
return;
}
// Don't print empty markup in archives if there's only one page.
if ( $wp_query->max_num_pages < 2 && ( is_home() || is_archive() || is_search() ) )
return;
$nav_class = ( is_single() ) ? 'post-navigation' : 'paging-navigation';
?>
%link', '' . _x( '←', 'Previous post link', 'becorp' ) . ' %title' ); ?>
%link', '%title ' . _x( '→', 'Next post link', 'becorp' ) . ' ' ); ?>
max_num_pages > 1 && ( is_home() || is_archive() || is_search() ) ) : // navigation links for home, archive, and search pages ?>
← Older posts', 'becorp' ) ); ?>
→', 'becorp' ) ); ?>
150)
$excerpt = $excerpt.''.__('Read More','becorp').' ';
return $excerpt;
return $excerpt;
}
// code for service index excerpt
function home_slider_excerpt(){
global $post;
$excerpt = the_content();
$excerpt = preg_replace(" (\[.*?\])",'',$excerpt);
$excerpt = strip_shortcodes($excerpt);
$excerpt = strip_tags($excerpt);
$original_len = strlen($excerpt);
$excerpt = substr($excerpt, 0, 150);
$excerpt = substr($excerpt, 0, strripos($excerpt, " "));
$excerpt = trim(preg_replace( '/\s+/', ' ', $excerpt));
$len=strlen($excerpt);
if($original_len>150)
$excerpt = $excerpt.''.__('MORE','becorp').' ';
return $excerpt;
return $excerpt;
}
if ( ! function_exists( 'becorp_the_custom_logo' ) ) :
function becorp_the_custom_logo() {
if ( function_exists( 'the_custom_logo' ) ) {
the_custom_logo();
}
}
endif;
?>