[Resolved] Author box in page

Home Forums Support [Resolved] Author box in page

Home Forums Support Author box in page

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1279680
    Sagar

    Hello there !

    Could you please provide the php script to show author box on both posts and pages?

    I have already added this script provided by Tom:

    <div class="author-box">
        
        <?php global $post; ?>
    	
        <div class="avatar"><?php echo get_avatar( get_the_author_meta( 'ID' )); ?></div>
        
        <h5 class="author-title">Written by <a href="<?php echo get_author_posts_url( get_the_author_meta( 'ID' ) ); ?>" title="Read more"><?php echo get_the_author_meta( 'display_name'); ?></a> on <?php echo generate_do_post_meta_item( 'date' ); ?></h5>
        
        <div class="author-summary">
    	
            <p class="author-description"><?php echo wp_kses( get_the_author_meta( 'description' ), null ); ?></p>
     
        </div>
     
    </div>
    #1280005
    Tom
    Lead Developer
    Lead Developer

    Hi there,

    How are you adding the author box at the moment? Elements? If so, have you tried expanding the Display Rules to include pages?

    #1280187
    Sagar

    Yeah. I tried the display rule option, but that worked only on post.
    Display Rules

    #1280196
    Sagar

    It’s now working after changing the hook option from after_entry_content to after_content. But, there may be a problem with after_entry_content.

    #1280443
    David
    Staff
    Customer Support

    The after_entry_content hook is only present on the single post.
    Glad to hear you got it resolved.

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