• Hello

    I need to swap featured images with the post/page titles, i.e. instead of the titles and meta-data appearing below featured images, having them above them. Although there are numerous such queries on the internet already, most of them pertain to other themes. A change needs to be made to one of the template files I understand, but I am not sure which one, and what change in it exactly, as regards the particular Simple Melody theme. I have tried many combinations, but all to no avail. Any help will be appreciated.

Viewing 5 replies - 1 through 5 (of 5 total)
  • Theme Author Sonia

    (@nudge)

    Hi arjunjain16,

    I’m going to assume you are referring to the single post page when you ask about titles and meta data vs image. If you want to switch these around you’ll need to cut the <header class="entry-header">...</header> code from content-single.php and paste it above the_post_thumbnail(); in the single.php file.

    Be sure to do this in a Child Theme, otherwise your changes will get overridden with any future theme updates.

    Thread Starter arjunjain16

    (@arjunjain16)

    Thanks a lot. I did that, but now I’ve got the entry-header both above and below the image. Also, I’d like to this for pages as well.

    Thread Starter arjunjain16

    (@arjunjain16)

    Hi, I used this temporarily to not display the repeated entry-header below the images: .single .entry-content .entry-header{
    display:none;
    }
    But do let me know please if a better solution is available.

    Theme Author Sonia

    (@nudge)

    As I mention above, you’ll need to cut the <header class="entry-header">...</header>code from content-single.php. In other words, delete it completely from that file since you’re putting it elsewhere. ??

    For pages you’ll need to do the same but this time cut <header class="entry-header">...</header> from content-page.php and paste it into page.php.

    Hope that helps!

    Thread Starter arjunjain16

    (@arjunjain16)

    I did do that same exact thing- I cut the required section completely:

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

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

    and pasted it from content.single.php to single.php, and from content.page.php to page.php.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Swapping the featured image and post/page title’ is closed to new replies.