[Resolved] Change in the Merch theme post

Home Forums Support [Resolved] Change in the Merch theme post

Home Forums Support Change in the Merch theme post

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1525697
    Roger

    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!

    #1525875
    Elvin
    Staff
    Customer Support

    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>

    A wise man once said:
    "Have you cleared your cache?"

    #1526473
    Roger

    Thanks Elvin

    Worked perfectly!!

    #1527242
    Elvin
    Staff
    Customer Support

    Thanks Elvin

    Worked perfectly!!

    Glad to be of any help. No problem. 😀

    A wise man once said:
    "Have you cleared your cache?"

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.