File: /home/vmasmheia229/domains/cindymuscarello.com/html/wp-content/themes/kathy/single.php
<?php
/**
* The template for displaying all single post content
*
* @since 1.0.0
*/
get_header(); ?>
<?php while ( have_posts() ) : the_post(); // Start the loop ?>
<div class="blog-single">
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if ( has_post_thumbnail() ) : ?>
<?php
$image_size = 'kathy-large';
echo '<div class="post-image">';
the_post_thumbnail( $image_size );
echo '</div>';
?>
<?php endif; // has_post_thumbnail() ?>
<div class="post-content-container clearfix">
<h1 class="post-title"><?php the_title(); ?></h1>
<div class="inner-post-content-container">
<div class="post-content">
<?php
the_content();
kathy_print_post_pagination();
?>
<div class="post-categories-tags-wrapper">
<?php
// Blog Category List
$categories = get_the_category();
?>
<?php if ( is_single() && ! empty( $categories ) ) : // Display categories only on the blog single page ?>
<ul class="post-meta meta-others meta-categories">
<li class="meta-title">
<?php
if ( count( $categories ) > 1 ) {
esc_html_e( 'Categories', 'kathy' );
} else {
esc_html_e( 'Category', 'kathy' );
}
?>
</li>
<?php
foreach ( $categories as $category ) {
echo '<li><a href="' . esc_url( get_category_link( $category->term_id ) ) . '">' . esc_html( $category->name ) . '</a></li>';
}
?>
</ul>
<?php endif; // if ( is_single() && ! empty( $categories ) ) : ?>
<?php
// Blog Tag List
$tags = get_the_tags();
?>
<?php if ( is_single() && ! empty( $tags ) ) : // Display categories only on the blog single page ?>
<ul class="post-meta meta-others meta-tags">
<li class="meta-title">
<?php
if ( count( $tags ) > 1 ) {
esc_html_e( 'Tags', 'kathy' );
} else {
esc_html_e( 'Tag', 'kathy' );
}
?>
</li>
<?php
foreach ( $tags as $tag ) {
echo '<li><a href="' . esc_url( get_tag_link( $tag->term_id ) ) . '">' . esc_html( $tag->name ) . '</a></li>';
}
?>
</ul>
<?php endif; // if ( is_single() && ! empty( $categories ) ) : ?>
</div>
<!-- .post-categories-tags-wrapper -->
</div>
</div>
<!-- .inner-post-content-container -->
</div>
<!-- .post-content-container -->
<?php get_template_part( 'template-parts/content-blog-meta' ); ?>
<?php
// Author bio
$author_desc = get_the_author_meta( 'description' );
// Author social strings
$author_social_string = '';
$social_url = get_the_author_meta( 'facebook' );
if ( ! empty( $social_url ) ) {
$author_social_string .= '<li><a href="' . esc_url( $social_url ) . '"><i class="fa fa-facebook" aria-hidden="true"></i></a></li>';
}
$social_url = get_the_author_meta( 'twitter' );
if ( ! empty( $social_url ) ) {
$author_social_string .= '<li><a href="' . esc_url( $social_url ) . '"><i class="fa fa-twitter" aria-hidden="true"></i></a></li>';
}
$social_url = get_the_author_meta( 'google' );
if ( ! empty( $social_url ) ) {
$author_social_string .= '<li><a href="' . esc_url( $social_url ) . '"><i class="fa fa-google-plus" aria-hidden="true"></i></a></li>';
}
$social_url = get_the_author_meta( 'instagram' );
if ( ! empty( $social_url ) ) {
$author_social_string .= '<li><a href="' . esc_url( $social_url ) . '"><i class="fa fa-instagram" aria-hidden="true"></i></a></li>';
}
$social_url = get_the_author_meta( 'flickr' );
if ( ! empty( $social_url ) ) {
$author_social_string .= '<li><a href="' . esc_url( $social_url ) . '"><i class="fa fa-flickr" aria-hidden="true"></i></a></li>';
}
$social_url = get_the_author_meta( 'px500' );
if ( ! empty( $social_url ) ) {
$author_social_string .= '<li><a href="' . esc_url( $social_url ) . '"><i class="fa fa-500px" aria-hidden="true"></i></a></li>';
}
$social_url = get_the_author_meta( 'pinterest' );
if ( ! empty( $social_url ) ) {
$author_social_string .= '<li><a href="' . esc_url( $social_url ) . '"><i class="fa fa-pinterest" aria-hidden="true"></i></a></li>';
}
$social_url = get_the_author_meta( 'linkedin' );
if ( ! empty( $social_url ) ) {
$author_social_string .= '<li><a href="' . esc_url( $social_url ) . '"><i class="fa fa-linkedin" aria-hidden="true"></i></a></li>';
}
$social_url = get_the_author_meta( 'dribbble' );
if ( ! empty( $social_url ) ) {
$author_social_string .= '<li><a href="' . esc_url( $social_url ) . '"><i class="fa fa-dribbble" aria-hidden="true"></i></a></li>';
}
$social_url = get_the_author_meta( 'behance' );
if ( ! empty( $social_url ) ) {
$author_social_string .= '<li><a href="' . esc_url( $social_url ) . '"><i class="fa fa-behance" aria-hidden="true"></i></a></li>';
}
$social_url = get_the_author_meta( 'vimeo' );
if ( ! empty( $social_url ) ) {
$author_social_string .= '<li><a href="' . esc_url( $social_url ) . '"><i class="fa fa-vimeo" aria-hidden="true"></i></a></li>';
}
$social_url = get_the_author_meta( 'youtube' );
if ( ! empty( $social_url ) ) {
$author_social_string .= '<li><a href="' . esc_url( $social_url ) . '"><i class="fa fa-youtube" aria-hidden="true"></i></a></li>';
}
$social_url = get_the_author_meta( 'soundcloud' );
if ( ! empty( $social_url ) ) {
$author_social_string .= '<li><a href="' . esc_url( $social_url ) . '"><i class="fa fa-soundcloud" aria-hidden="true"></i></a></li>';
}
?>
<?php if ( ! empty( $author_desc ) || ! empty( $author_social_string ) ) : ?>
<!-- Author Section -->
<section class="author-info content-section-wrapper clearfix">
<h3 class="section-title"><a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ); ?>"><?php echo esc_html__( 'Written by', 'kathy' ) . ' ' . get_the_author(); ?></a></h3>
<div class="section-content">
<?php if ( ! empty( $author_desc ) ) : ?>
<?php echo get_the_author_meta( 'description' ); ?>
<?php endif; ?>
<?php if ( ! empty( $author_social_string ) ) : ?>
<ul class="author-social">
<?php echo kathy_wp_kses_escape( $author_social_string, array( 'i' => array( 'class' => array(), 'aria-hidden' => array() ) ) ); ?>
</ul>
<?php endif; ?>
</div>
</section>
<?php endif; ?>
<?php
// Post navigation
if ( get_theme_mod( 'kathy_ctmzr_general_options_enable_post_navigation', true ) ) {
kathy_print_post_navigation();
}
// Comment Section
if ( get_theme_mod( 'kathy_ctmzr_general_options_enable_blog_comments', true ) ) {
comments_template();
}
?>
</article>
</div>
<!-- .blog-single -->
<?php endwhile; // End of the loop ?>
<?php get_footer(); ?>