• here is the replacement contents of “content-single.php” for anyone that would like the featured image to show at the top of every post:
    <?php
    /**
    * Template part for displaying single posts.
    *
    * @link https://codex.www.ads-software.com/Template_Hierarchy
    *
    * @package EasyMag
    */

    ?>

    <article id=”post-<?php the_ID(); ?>” <?php post_class(); ?>>

    <?php if ( has_post_thumbnail() ) : ?>

    <figure>

    <?php the_post_thumbnail(); ?>

    </figure>

    <?php endif; ?>

    <header class=”entry-header”>
    <?php the_title( ‘<h1 class=”entry-title”>’, ‘</h1>’ ); ?>

    <div class=”entry-meta”>
    <?php easymag_posted_on(); ?>
    </div><!– .entry-meta –>
    </header><!– .entry-header –>

    <div class=”entry-content”>
    <?php the_content(); ?>
    <?php
    wp_link_pages( array(
    ‘before’ => ‘<div class=”page-links”>’ . esc_html__( ‘Pages:’, ‘easymag’ ),
    ‘after’ => ‘</div>’,
    ) );
    ?>
    </div><!– .entry-content –>

    <footer class=”entry-footer”>
    <?php easymag_entry_footer(); ?>
    </footer><!– .entry-footer –>

    <?php if ( get_theme_mod( ‘easymag_related_posts_setting’, 0 ) == 1 ) : ?>
    <?php get_template_part( ‘template-parts/related-posts’ );?>
    <?php endif; ?>
    </article><!– #post-## –>

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘To enable featured images in posts’ is closed to new replies.