89 lines
2.2 KiB
PHP
89 lines
2.2 KiB
PHP
<?php
|
|
/**
|
|
* Template part for displaying posts
|
|
*
|
|
* @link https://developer.wordpress.org/themes/basics/template-hierarchy/
|
|
*
|
|
* @package Upstudy
|
|
*/
|
|
|
|
|
|
$blog_single_layout = Upstudy::setting( 'blog_single_layout' );
|
|
|
|
if ($blog_single_layout == 'blog_layout_title_first'):
|
|
|
|
get_template_part( 'template-parts/posts/single', 'title-first');
|
|
|
|
elseif($blog_single_layout == 'blog_layout_image_first'):
|
|
|
|
get_template_part( 'template-parts/posts/single', 'image-first');
|
|
|
|
else: // fallback
|
|
|
|
?>
|
|
|
|
<article id="post-<?php the_ID(); ?>" <?php post_class( 'upstudy-single-post edu-blog' ); ?>>
|
|
<?php
|
|
|
|
/**
|
|
* upstudy_single_post_thumbnail_before hook
|
|
*
|
|
* @hooked upstudy_single_post_thumbnail_before_content - 10
|
|
*/
|
|
|
|
upstudy_post_thumbnail();
|
|
|
|
do_action( 'upstudy_single_post_thumbnail_before' );
|
|
|
|
|
|
?>
|
|
|
|
<div class="entry-content">
|
|
<?php
|
|
if ( is_single() ) :
|
|
/**
|
|
* upstudy_single_post_before hook
|
|
*
|
|
*/
|
|
do_action( 'upstudy_single_post_before' );
|
|
|
|
the_content( sprintf(
|
|
/* translators: %s: Name of current post. Only visible to screen readers */
|
|
wp_kses( __( 'Continue reading<span class="screen-reader-text"> "%s"</span>', 'upstudy' ), array( 'span' => array( 'class' => array() ) ) ),
|
|
get_the_title()
|
|
) );
|
|
|
|
if ( function_exists( 'upstudy_link_pages' ) ) :
|
|
upstudy_link_pages( array(
|
|
'before' => '<nav class="upstudy-theme-page-links">' . __( 'Pages:', 'upstudy' ) . '<ul class="pager">',
|
|
'after' => '</ul></nav>',
|
|
) );
|
|
else :
|
|
wp_link_pages( array(
|
|
'before' => '<div class="page-links">' . __( 'Pages:', 'upstudy' ),
|
|
'after' => '</div>',
|
|
) );
|
|
endif;
|
|
|
|
/**
|
|
* upstudy_single_post_after hook
|
|
*
|
|
* @hooked upstudy_single_post_after_cats_social_share - 10
|
|
* @hooked upstudy_single_post_after_author_bio - 15
|
|
* @hooked upstudy_post_nav_prev_next - 20
|
|
*/
|
|
do_action( 'upstudy_single_post_after' );
|
|
else :
|
|
the_excerpt();
|
|
endif;
|
|
?>
|
|
</div><!-- .entry-content -->
|
|
|
|
<footer class="entry-footer">
|
|
<?php upstudy_entry_footer(); ?>
|
|
</footer><!-- .entry-footer -->
|
|
</article><!-- #post-<?php the_ID(); ?> -->
|
|
|
|
<?php
|
|
|
|
endif;
|