';
if ( is_day() ) :
printf( esc_html__( '%1$s %2$s', 'innofit' ), esc_html($innofit_archive_text), esc_html(get_the_date()) );
elseif ( is_month() ) :
printf( esc_html__( '%1$s %2$s', 'innofit' ), esc_html($innofit_archive_text), esc_html(get_the_date()) );
elseif ( is_year() ) :
printf( esc_html__( '%1$s %2$s', 'innofit' ), esc_html($innofit_archive_text), esc_html(get_the_date()) );
elseif( is_category() ):
$innofit_category_text = get_theme_mod('category_prefix',__('Category','innofit'));
printf( esc_html__( '%1$s %2$s', 'innofit' ), esc_html($innofit_category_text), esc_html(single_cat_title( '', false )) );
elseif( is_author() ):
$innofit_author_text = get_theme_mod('author_prefix',__('All posts by','innofit'));
printf( esc_html__( '%1$s %2$s', 'innofit' ), esc_html($innofit_author_text), esc_html(get_the_author()) );
elseif( is_tag() ):
$innofit_tag_text = get_theme_mod('tag_prefix',__('Tag','innofit'));
printf( esc_html__( '%1$s %2$s', 'innofit' ), esc_html($innofit_tag_text), single_tag_title( '', false ) );
elseif( class_exists( 'WooCommerce' ) && is_shop() ):
$innofit_shop_text = get_theme_mod('shop_prefix',__('Shop','innofit'));
printf( esc_html__( '%1$s %2$s', 'innofit' ), esc_html($innofit_shop_text), single_tag_title( '', false ));
elseif( is_archive() ):
the_archive_title( '', '
' );
endif;
echo '
';
}
elseif( is_search() )
{
$innofit_search_text = get_theme_mod('search_prefix',__('Search results for','innofit'));
echo '';
printf( esc_html__( '%1$s %2$s', 'innofit' ), esc_html($innofit_search_text), get_search_query() );
echo '
';
}
elseif( is_404() )
{
$innofit_breadcrumbs_text = get_theme_mod('404_prefix',__('404','innofit'));
echo '';
printf( esc_html__( '%1$s %2$s', 'innofit' ) , esc_html($innofit_breadcrumbs_text),'' );
echo '
';
}
else
{
$allowed_html = array(
'br' => array(),
'em' => array(),
'strong' => array(),
'i' => array(
'class' => array(),
),
'span' => array(),
);
echo ''.wp_kses( force_balance_tags( get_the_title()), $allowed_html ).'
';
}
}
// Innofit post navigation
function innofit_post_nav()
{
global $post;
echo '';
posts_nav_link( ' · ', esc_html__('previous page','innofit'), esc_html__('next page','innofit') );
echo '
';
}
//Hide Title of woocommerce shop page
add_filter( 'woocommerce_show_page_title' , 'innofit_woo_hide_page_title' );
function innofit_woo_hide_page_title() {
return false;
}
if(!function_exists( 'innofit_image_thumbnail')) :
function innofit_image_thumbnail($preset,$class){
if(has_post_thumbnail()){ $defalt_arg =array('class' => $class);
the_post_thumbnail($preset, $defalt_arg); } }
endif;
add_action( 'wp_footer', 'innofit_demo_store' );
function innofit_demo_store() {
if ( class_exists( 'WooCommerce' ) ) {
$woocommerce_demo_store = get_option('woocommerce_demo_store', 'no');
if($woocommerce_demo_store !='no')
{
?>
post_content;
if ( ! empty( $post_obj->post_excerpt ) ) {
$source_content = $post_obj->post_excerpt;
}
$source_content = preg_replace( '`\[[^\]]*\]`', '', $source_content );
$trimmed_content = wp_trim_words( $source_content, $length, '…' );
return $trimmed_content;
}
endif;
if ( ! function_exists( 'innofitp_activate' ) ):
//Container Setting For Page
function innofit_container()
{
$container_width= '';
return $container_width;
}
//Container Setting For Blog Post
function innofit_blog_post_container()
{
$container_width= '';
return $container_width;
}
//Conainer Setting For Single Post
function innofit_single_post_container()
{
$container_width= '';
return $container_width;
}
endif;
function innofit_blog_template_fn(){
$innofit_pages = (get_query_var('paged')) ? get_query_var('paged') : 1;
$innofit_args = array( 'post_type' => 'post','paged'=>$innofit_pages);
$innofit_loop = new WP_Query( $innofit_args );
if ( $innofit_loop->have_posts() ) :
// Start the Loop.
while ( $innofit_loop->have_posts() ) : $innofit_loop->the_post();
// Include the post format-specific template for the content.
get_template_part( 'content','');
endwhile;
if ( function_exists( 'innofitp_activate' ) ):
// pagination function
$innofit_obj = new innofit_pagination();
$innofit_obj->innofit_page($innofit_loop);
endif;
endif;
wp_reset_postdata();
}
add_action('innofit_blog_template_hook','innofit_blog_template_fn');
//innofit navigation
function innofit_navigation_fn(){
$innofit_home_page_slider_enabled = get_theme_mod('home_page_slider_enabled','on');
if($innofit_home_page_slider_enabled !='on' || is_home())
{?>