Support » Plugin: Simple Local Avatars » Call Simple Local Avatar

  • Hi,

    I think that Im very close to achieve my goal..
    I have this function on my themes but I need your help to find the right way to cal your function so it will show the local author simple local avatar?

    $first_img = get_avatar( $post->post_author );

    Can you help?

    function get_post_image() {
      global $post, $posts;
      $first_img = '';
      $output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
      $first_img = $matches [1] [0];
      if(empty($first_img)){ //Defines a default image
        $first_img = get_avatar( $post->post_author );
      return $first_img;

  • The topic ‘Call Simple Local Avatar’ is closed to new replies.