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
- Why isn’t is_page working when I put it in the functions.php file?
- Show modified time if post is actually modified
- Automatically set the featured image
- AJAX handler throws 400 (Bad request) – why?
- 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
- Why are image thumbnails cropped proportionally (not per dimensions)?
- 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
- A snippet after every image
- Setting featured image with function, 1 part not working
- Function to show only first instance of shortcode
- Automatically insert php function into post $the_content
- 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
- Filtering posts by category name based on page’s slug
- img width and height attributes being set by get_the_post_thumbnail
- 2 Loops, Only Displaying 1 Loop in Both Loops
- Get the 5 lastest Featured Posts from a category
- How to display a default image for post thumbnail using functions.php?
- 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()
- Add Featured image column into wordpress admin on pages AND posts
- Post thumbnail not showing in WP admin area for custom post type
- Overwriting Parent Theme’s Image Sizes
- Backstretch.js and thumbnail sizes to reduce loading time
- set_post_thumbnail when user is not logged in
- Having a Function Inside of the Loop
- Getting different functions data while using while loop in wordpress
- 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
- Set spesific size of featured images
- 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?
- It does not work concatenation in function.php
- The Loop not looping?
- How to retrieve the current post’s generated featured image size?
- 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?
- Conditional statement not working in function
- 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?
- Breaking up multiple words and inserting an image after first word
- Show Featured Image in else statement
- Change custom featured image size in twentythirteen child theme
- 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
- Custom image sizes showing in Classic Editor only when upladed directly to post
- 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 I use ‘Featured Image’ as a hero image and a thumbnail?
- remove_filter function to unhook twentysixteen parent theme function
- How set a while with a function
- 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
- No src and sizes attributes present on WordPress thumbnail images; the smallest image size is loaded irregardless of viewport size
- add_image_size() parameter four ($crop = true) is ignored: the_post_thumbnail() returns scaled image(s) instead of hard cropped