Site logo

Archived topic

Change in the Merch theme post

3 replies · Started by Roger on November 10, 2020

Viewing posts 1–4 of 4

Hi,

I'm using the Merch theme and would like to make some changes to the post

1. Include the photo of the author of the post
2. Include the author's name below the photo
3. Change the position of the post date

How can I make these changes?

Please see the attached image
https://classicalguitar.art/change-in-the-merch-theme-post/

Thanks!

Hi,

Under Appearance > Elements, you should be able to see a Hook Element named Single Post Entry Header.

Once you open it, you'll see a bunch of codes.

Replace those codes with this one below:

<div id="custom-post-entry-header" class="custom-post-header grid-container">		
	<?php 
		global $post;
    $author_id = $post->post_author; 
    ?>
    <div class="gravatar">
        <?php echo get_avatar( $author_id ); ?>
    </div>
		<span class="author-name" itemprop="name">
			<a href="<?php echo esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) );  ?>">
			<?php echo get_the_author_meta('display_name',$author_id ); ?>
			</a>
		</span>
	<?php   
	the_title( '<h1 class="entry-title" itemprop="headline">', '</h1>' );
	if ( has_excerpt() ) : // Only show custom excerpts not autoexcerpts ?>
		<p class="entry-subtitle"><?php echo get_the_excerpt(); ?></p>
	<?php endif; ?>
	<time class="entry-date published" datetime="<?php echo esc_attr( get_the_date( 'c' ) ); ?>" itemprop="datePublished"><?php echo esc_html( get_the_date() ); ?></time>
</div>

Thanks Elvin

Worked perfectly!!

Thanks Elvin

Worked perfectly!!

Glad to be of any help. No problem. :D

This archived topic is closed to new replies.