File: /home/defaultwebsite/public/wp-content/themes/webgatha/single.php
<?php
/**
* The template for displaying all single posts
*
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/#single-post
*
* @package WebGatha
* @since 1.0.0
*/
if ( function_exists( 'webgathacore_set_post_view_count' ) ) {
webgathacore_set_post_view_count();
}
get_header();
global $webgatha_options;
$area_col_classes = webgatha_column_classes();
?>
<div class="container">
<div class="row">
<div class="<?php echo esc_attr( $area_col_classes ); ?>">
<div id="primary" class="content-area">
<main id="main" class="site-main">
<?php
while ( have_posts() ) :
the_post();
get_template_part( 'template-parts/content', get_post_type() );
$post_nav = '1';
if ( isset( $webgatha_options['post_nav'] ) ) {
$post_nav = $webgatha_options['post_nav'];
}
// Post Navigation.
if ( ( get_next_post() || get_previous_post() ) && ( '1' === $post_nav ) ) {
?>
<nav class="navigation post-navigation" role="navigation">
<div class="nav-links">
<?php
if ( get_previous_post() ) {
?>
<div class="nav-previous">
<?php
echo wp_kses( get_previous_post_link( '%link', '<span class="pagi_text">' . esc_html__( 'PREV', 'webgatha' ) . '</span><span class="nav_title">%title</span>' ), webgatha_allowed_html( array( 'a', 'span' ) ) );
?>
</div>
<?php
}
if ( get_next_post() ) {
?>
<div class="nav-next">
<?php
echo wp_kses( get_next_post_link( '%link', '</span><span class="nav_title">%title</span><span class="pagi_text">' . esc_html__( 'NEXT', 'webgatha' ) ), webgatha_allowed_html( array( 'a', 'span' ) ) );
?>
</div>
<?php
}
?>
</div>
</nav>
<?php
}
// Author box.
webgatha_author_box();
// Related Post.
webgatha_related_post();
// If comments are open or we have at least one comment, load up the comment template.
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
endwhile; // End of the loop.
wp_reset_postdata();
?>
</main><!-- #main -->
</div><!-- #primary -->
</div>
<?php get_sidebar(); ?>
</div>
</div>
<?php
get_footer();