Support » Plugin: Advanced Most Recent Posts Mod » Just what I needed

  • zzelladonatella


    Great plugin, just what I needed.
    I added some code to use the featured image (if there is one) before reverting to the default:
    Before this line:
    if (!$img && $defimage)
    Place the following code:

      $featured_img = get_post_thumbnail_id($post->ID);
      $imgsrc = wp_get_attachment_image_src($featured_img, 'thumbnail');
      if(!empty($imgsrc[0])) { $img = $imgsrc[0]; }

    Untick “get first image” and “get first attached image” and the post’s featured image will be used as the thumbnail.

  • The topic ‘Just what I needed’ is closed to new replies.