Get the Image does what you need and better. It’s NOT overwhelming with lots of unnecessary features, and does what it says. Try it to see if it does what you need.
How does Get the Image plugin pull images?
Looks for an image by custom field (one of your choosing).
If no image is added by custom field, check for an image using the_post_thumbnail() (WP 2.9’s new image feature).
If no image is found, it grabs an image attached to your post.
If no image is attached, it can extract an image from your post content (off by default).
If no image is found at this point, it will default to an image you set (not set by default).
Related Posts:
- Missing feature image link function
- Show modified time if post is actually modified
- Automatically set the featured image
- Get recent posts with thumbnail
- Show/hide Widgets in Dashboard Based on Current Advanced Custom Fields Option
- Add options to featured image
- Can shortcodes contain conditional statements? Even without them my shortcode renders blank page
- Linking thumbnail to full size image
- Generating Responsive Background Image Sizes in PHP
- Most elegant way to enqueue scripts in function.php with foreach loop
- If function exists, and array is met, echo function?
- Add a Post Thumbnail to an RSS Feed with custom size
- WordPress – thumbnail image from youtube (function and loop)
- Make WordPress size and name images for Retina.js
- Why are image thumbnails cropped proportionally (not per dimensions)?
- the_post_thumbnail fallback using hooks
- Adding WooCommerce to a Custom Theme – not working [closed]
- Display height and width properties with the_post_thumbnail() or related function
- Conditions for Users and Visitors
- Creating loop within functions.php
- Removing the first image in content
- How to set the jpg image compression for specific thumbnail sizes?
- Function to auto-set a featured image that is already in use
- Display WooCommerce subscriptions for user [closed]
- How to use max and min values of custom fields
- Custom Shortcode, functions PHP WP_Query loop
- img width and height attributes being set by get_the_post_thumbnail
- Get the 5 lastest Featured Posts from a category
- Change size and crop medium_large images
- Getting Featured Image Caption to Only Show if Populated
- wp_get_attachment_image function size argument not working if I also add a custom class
- Can’t check if a post has thumbnail adding filter to get_post_metadata()
- Post thumbnail not showing in WP admin area for custom post type
- Backstretch.js and thumbnail sizes to reduce loading time
- set_post_thumbnail when user is not logged in
- How to stop twenty fifteen theme from cropping featured images?
- Create a new query in function.php to filter blog posts
- Can you put a condition on add_image_size() depending on the width of the uploaded image?
- show first 3 thumbnails of posts in different sizes [closed]
- Limit length of first excerpt in the loop
- Default Custom Field Value Automatically Update
- Can’t generate thumbnail images
- Multiple Loops Meta Data
- Why doesn’t is_page(id) work in functions.php?
- The Loop not looping?
- Check if the image size is available and if not use ‘full’ image size
- While loop with an exception after a count is reached
- is there a way to remove featured image from blog page and single page
- How to hide image-url if no attachment?
- How do I pull excerpts from pages?
- Output loop to function return?
- Can set_post_thumbnail be used to remove a thumbnail?
- issue with if/elseif in_array inside foreach loop display only one post
- Can’t locate custom image sizes defined by child theme
- Genesis Framework: How to exclude a specific author from archive custom loop
- Problem with calling custom function in a foreach loop
- Get term slug by term id and then explode it
- Using functions.php to include code that’s processed inline
- How to add a new image size and apply it to posts only?
- Show Featured Image in else statement
- resizing of thumbnails not working
- Featured Image keeps cropping
- Conditional function for excluding first image from content, not working
- show all the posts thumbnails
- struggling with syntax for the_post_thumbnail();
- include w_thumbnail_src in function?
- Simplest Way to Build Custom Archives Page?
- Woocommerce Variable Product Dropdown for Custom Shop Template
- the_date() and the_time() functions display actual date an time instead of published date and time
- Which filter fires upon setting a featured image
- Can You Set A Minimum Image Dimension For Resizing Images?
- Pass post ID from archive template to functions file
- Prevent function from triggering on current page
- How to use `foreach()` in ajax call
- Featured image on archive page based on post type
- Printing medium sized image
- Sticky – Featured Image
- Code executes outside of Loop while same code gives ‘Uninitialized string offset’ notice inside a while loop
- Using Switch Statement to Change Image According to Last Digit of Topic ID
- Frontend Feature image upload not work
- Only seems to be displaying one child when there are supposed to be multiple
- Best way to add image to recent posts widget?
- Slider Thumbnail Size Issue [closed]
- Remove Featured Images from Posts Older Than a Certain Date
- Integrate WP Tiles into existing loop (index.php) and theme
- Apply height and width for the_content() inside youtube video tag
- Check if excerpt is empty at loop-portfolio
- Set thumbnail from URL, by grabbing image in functions.php
- add_theme_support not outputting thumbnails
- restrict access to specific urls on a specific period of time
- Using conditionals, maybe from a DB, to register & enqueue files, for varying pages, in functions.php
- Why don’t some template tags work when querying information on single.php?
- Image width issue in IE [closed]
- how to handle multiple forloop?
- Parse error: syntax error, unexpected ‘endforeach’ (T_ENDFOREACH) in [closed]
- How do grab the main loop, with conditions, and output via shortcodes
- image_size with respect to aspect ratios
- Is mytheme_post_thumbnails() still necessary?
- Get full slug for a WordPress Post
- Update post meta with wp cron