• Hello,

    can you please help me with with this issue – is there a way to put the post title above the feature image / put the feature image below the post title?

    I already set up a childe them and keep customizing it this way.

    Many thanks!

Viewing 1 replies (of 1 total)
  • Moderator Kathryn Presner

    (@zoonini)

    The display of the featured image and post title are contained in the file content.php. This file is pulled into both index.php – which controls the blog index – and single.php – which controls single posts.

    Lines 9-17 define the display of the featured image:

    <?php if ( '' != get_the_post_thumbnail() ) : ?>
    <?php if ( ! is_single() ) : ?>
    <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to %s', 'ryu' ), the_title_attribute( 'echo=0' ) ) ); ?>" rel="<?php the_ID(); ?>" class="ryu-featured-thumbnail">
    <?php the_post_thumbnail( 'ryu-featured-thumbnail' ); ?>
    </a>
    <?php else : ?>
    <?php the_post_thumbnail( 'ryu-featured-thumbnail' ); ?>
    <?php endif; ?>
    <?php endif; ?>

    Lines 19-31 control the display of the entry header section, which includes the post title:

    <header class="entry-header">
    <?php
     $categories_list = get_the_category_list( __( ', ', 'ryu' ) );
     if ( $categories_list && ryu_categorized_blog() )
       echo '<span class="categories-links">' . $categories_list . '</span>';
    
     if ( ! is_single() ) :
     the_title( '<h1 class="entry-title"><a href="' . esc_url( get_permalink() ) . '" rel="bookmark">', '</a></h1>' );
     else :
    the_title( '<h1 class="entry-title">', '</h1>' );
    endif;
    ?>
    </header><!-- .entry-header -->

    This should point you in the right direction. Now you can make a copy of content.php in your child theme and rearrange the elements to get the display looking how you want.

Viewing 1 replies (of 1 total)
  • The topic ‘How to put the post title above the feature image?’ is closed to new replies.