/** * Custom header codes for the home page, single posts and pages */ function cleanblog_header() { ?> <?php if (is_single()) { ?> <!-- Page Header --> <!-- Set your background image for this header on the line below. --> <?php $feat_image = wp_get_attachment_url(get_post_thumbnail_id($post->ID)); ?> <header class="intro-header" style="background-color: #404040; background-image: url('<?php echo $feat_image; ?> ')"> <div class="container"> <div class="row"> <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> <div class="post-heading"> <h1><?php single_post_title(); ?> </h1> <?php if (function_exists('the_subtitle')) { the_subtitle('<h2 class="subheading">', '</h2>'); } ?> <span class="meta"><?php cleanblog_posted_on(); ?> </span> </div> </div> </div> </div> </header> <?php } elseif (is_page()) { ?> <!-- Page Header --> <!-- Set your background image for this header on the line below. --> <?php $feat_image = wp_get_attachment_url(get_post_thumbnail_id($post->ID)); ?> <header class="intro-header" style="background-color: #404040; background-image: url('<?php echo $feat_image; ?> ')"> <div class="container"> <div class="row"> <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> <div class="site-heading"> <h1><?php single_post_title(); ?> </h1> <hr class="small"> <?php if (function_exists('the_subtitle')) { the_subtitle('<span class="subheading">', '</span>'); } ?> </div> <!-- /.site-heading --> </div> <!-- /.col-lg-8.col-lg-offset-2.col-md-10.col-md-offset-1 --> </div> <!-- /.row --> </div> <!-- /.container --> </header> <?php } elseif (is_search()) { ?> <!-- Page Header --> <!-- Set your background image for this header on the line below. --> <header class="intro-header" style="background-color: #404040;')"> <div class="container"> <div class="row"> <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> <div class="site-heading"> <h1><?php esc_html_e('Search Results', 'cleanblog'); ?> </h1> <hr class="small"> <span class="subheading"><?php printf(esc_html__('You searched for: "%s"', 'cleanblog'), '<span>' . get_search_query() . '</span>'); ?> </span> </div> <!-- /.site-heading --> </div> <!-- /.col-lg-8.col-lg-offset-2.col-md-10.col-md-offset-1 --> </div> <!-- /.row --> </div> <!-- /.container --> </header> <?php } else { ?> <!-- Page Header --> <!-- Set your background image for this header on the line below. --> <?php if (get_theme_mod('cleanblog_homeintro_image') != '') { ?> <?php $headerimg = get_theme_mod('cleanblog_homeintro_image'); ?> <?php } else { ?> <?php $headerimg = get_template_directory_uri() . '/img/avila.gif'; ?> <?php } ?> <header class="intro-header" style="background-color: #404040; background-image: url('<?php echo $headerimg; ?> ')"> <div class="container"> <div class="row"> <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> <div class="site-heading"> <?php if (get_theme_mod('cleanblog_homeintro_title') != '') { ?> <h1 class="homeintro"><?php echo get_theme_mod('cleanblog_homeintro_title'); ?> </h1> <?php } else { ?> <h1><?php esc_html_e('{ Hello Wold }', 'cleanblog'); ?> </h1> <?php } ?> <hr class="small"> <?php if (get_theme_mod('cleanblog_homeintro_subtitle') != '') { ?> <span class="subheading"><?php echo get_theme_mod('cleanblog_homeintro_subtitle'); ?> </span> <?php } else { ?> <span class="subheading"><?php esc_html_e('Entrepreneurial and surviving thoughts from a passionate developer.', 'cleanblog'); ?> </span> <?php } ?> </div> <!-- /.site-heading --> </div> <!-- /.col-lg-8.col-lg-offset-2.col-md-10.col-md-offset-1 --> </div> <!-- /.row --> </div> <!-- /.container --> </header> <?php } ?> <?php }
<div <?php post_class('post-preview'); ?> id="post-<?php the_ID(); ?> "> <?php the_title(sprintf('<h2 class="post-title"><a href="%s" rel="bookmark">', esc_url(get_permalink())), '</a></h2>'); ?> <?php if ('post' == get_post_type()) { ?> <p class="post-meta"><?php cleanblog_posted_on(); ?> </p> <?php } ?> <?php if ('show' === get_theme_mod('cleanblog_post_excerpt') || '' === get_theme_mod('cleanblog_post_excerpt')) { ?> <?php the_excerpt(); ?> <?php } ?> </div>
/** * Custom header codes for the home page, single posts and pages */ function cleanblog_header() { ?> <?php if (is_single()) { ?> <!-- Page Header --> <!-- Set your background image for this header on the line below. --> <?php $feat_image = wp_get_attachment_url(get_post_thumbnail_id($post->ID)); ?> <header class="intro-header" style="background-color: <?php echo get_theme_mod('cleanblog_header_background_color'); ?> ; background-image: url('<?php echo $feat_image; ?> ')"> <div class="container"> <div class="row"> <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> <div class="post-heading"> <h1><?php single_post_title(); ?> </h1> <?php if (function_exists('the_subtitle')) { the_subtitle('<h2 class="subheading">', '</h2>'); } ?> <span class="meta"><?php cleanblog_posted_on(); ?> </span> </div> </div> </div> </div> </header> <?php } elseif (is_page_template('page-builder.php')) { ?> <?php } elseif (is_page()) { ?> <!-- Page Header --> <!-- Set your background image for this header on the line below. --> <?php $feat_image = wp_get_attachment_url(get_post_thumbnail_id($post->ID)); ?> <header class="intro-header" style="background-color: <?php echo get_theme_mod('cleanblog_header_background_color'); ?> ; background-image: url('<?php echo $feat_image; ?> ')"> <div class="container"> <div class="row"> <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> <div class="site-heading"> <h1><?php single_post_title(); ?> </h1> <hr class="small"> <?php if (function_exists('the_subtitle')) { the_subtitle('<span class="subheading">', '</span>'); } ?> </div> <!-- /.site-heading --> </div> <!-- /.col-lg-8.col-lg-offset-2.col-md-10.col-md-offset-1 --> </div> <!-- /.row --> </div> <!-- /.container --> </header> <?php } elseif (is_search()) { ?> <!-- Page Header --> <!-- Set your background image for this header on the line below. --> <header class="intro-header" style="background-color: <?php echo get_theme_mod('cleanblog_header_background_color'); ?> ;')"> <div class="container"> <div class="row"> <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> <div class="site-heading"> <h1><?php esc_html_e('Search Results', 'cleanblog'); ?> </h1> <hr class="small"> <span class="subheading"><?php printf(esc_html__('You searched for: "%s"', 'cleanblog'), '<span>' . get_search_query() . '</span>'); ?> </span> </div> <!-- /.site-heading --> </div> <!-- /.col-lg-8.col-lg-offset-2.col-md-10.col-md-offset-1 --> </div> <!-- /.row --> </div> <!-- /.container --> </header> <?php } else { ?> <!-- Page Header --> <!-- Set your background image for this header on the line below. --> <?php if (get_theme_mod('cleanblog_homeintro_image') != '') { ?> <?php $headerimg = get_theme_mod('cleanblog_homeintro_image'); ?> <?php } else { ?> <?php $headerimg = get_template_directory_uri() . '/img/home-bg.jpg'; ?> <?php } ?> <header class="intro-header" style="background-color: <?php echo get_theme_mod('cleanblog_header_background_color'); ?> ; background-image: url('<?php echo $headerimg; ?> ')"> <div class="container"> <div class="row"> <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1"> <div class="site-heading"> <?php if (get_theme_mod('cleanblog_homeintro_title') != '') { ?> <h1 class="homeintro"><?php echo get_theme_mod('cleanblog_homeintro_title'); ?> </h1> <?php } else { ?> <h1><?php esc_html_e('Clean Blog', 'cleanblog'); ?> </h1> <?php } ?> <hr class="small"> <?php if (get_theme_mod('cleanblog_homeintro_subtitle') != '') { ?> <span class="subheading"><?php echo get_theme_mod('cleanblog_homeintro_subtitle'); ?> </span> <?php } else { ?> <span class="subheading"><?php esc_html_e('A Clean Blog Theme by Devio Digital', 'cleanblog'); ?> </span> <?php } ?> </div> <!-- /.site-heading --> </div> <!-- /.col-lg-8.col-lg-offset-2.col-md-10.col-md-offset-1 --> </div> <!-- /.row --> </div> <!-- /.container --> </header> <?php } ?> <?php }