Move meta data below featured image on post page (Renew)

Hello ThemeCo Team,

On my client’s post pages, I would like the meta data to appear below the featured image instead of above it. I already have a child theme set up, so you can you please help me out with some code to make this happen? I am using Renew.

Thanks!
Rayna

Oh and also, since I have already changed the post page titles to be the post title instead of the generic BLOG, how can I remove the post title from the meta data?

Thanks

Hi There,

Because this requires a template change, I’d advise that you setup a child theme. This allows you to make code changes that won’t be overwritten when an X update is released. After your child theme is setup, please review how we recommend making template changes in Customization Best Practices.

Then navigate to your child theme’s

  • /framework/views/renew/ directory create a file named _content-post-header.php and paste the code below:
<?php

// =============================================================================
// VIEWS/RENEW/_CONTENT-POST-HEADER.PHP
// -----------------------------------------------------------------------------
// Standard <header> output for various posts.
// =============================================================================

?>

<header class="entry-header">
  <?php if ( is_single() ) : ?>
  <h1 class="entry-title"><?php the_title(); ?></h1>
  <?php else : ?>
  <h2 class="entry-title">
    <a href="<?php the_permalink(); ?>" title="<?php echo esc_attr( sprintf( __( 'Permalink to: "%s"', '__x__' ), the_title_attribute( 'echo=0' ) ) ); ?>"><?php the_title(); ?></a>
  </h2>
  <?php endif; ?>
</header>
  • /framework/views/renew/ directory create a file named content.php and paste the code below:
<?php

// =============================================================================
// VIEWS/RENEW/CONTENT.PHP
// -----------------------------------------------------------------------------
// Standard post output for Renew.
// =============================================================================

?>

<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
  <div class="entry-wrap">
    <?php x_get_view( 'renew', '_content', 'post-header' ); ?>
    <?php if ( has_post_thumbnail() ) : ?>
      <div class="entry-featured">
        <?php x_featured_image(); ?>
      </div>
    <?php endif; ?>
  	<?php x_renew_entry_meta(); ?>
    <?php x_get_view( 'global', '_content' ); ?>
  </div>
</article>

Please provide us with your website URL so we can take a closer look.

Thanks.

Thank you so much! That worked perfectly.

I remembered how to remove the post title on the post pages. For anyone who is reading this and is interested in what I did, I simply entered this CSS in the Edit Global CSS section in Customizer:

.entry-title {
display: none;
}

You’re most welcome and thanks for sharing :wink:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.