• I need help with using these functions outside the loop by passing post ID to it. So, before it was like below:

    $author_id = get_post_field( 'post_author', get_the_ID() );
    
    					$meta = '<span class="vcard author"><span class="fn"><a href="'.esc_url( get_author_posts_url( get_the_author_meta( 'ID', $author_id ) ) ).'">'.get_avatar( get_the_author_meta('ID'), 24).' '.get_the_author_meta( 'display_name', $author_id ).'</a></span></span>';

    Now, I am not sure how to pass ID to plugin function in order to get the same result.

    Thanks in advance.

  • The topic ‘How to use it outside loop by passing post ID?’ is closed to new replies.