WordPress.org

Forums

Hueman
[resolved] Setting featured image automatically (6 posts)

  1. mavieth
    Member
    Posted 1 year ago #

    Is there anyway to set the featured image as any image that appears in the post content/excerpt?

  2. mavieth
    Member
    Posted 1 year ago #

    For example, if I had an image link in my excerpt, it would automatically set that image to be the featured image. There will never be a case of having more than one image.

  3. stephencottontail
    Member
    Posted 1 year ago #

    I'm working on a solution right now. However, couldn't you just set the featured image when you originally write the post, or are you trying to do something more complicated than that?

  4. Alexander Agnarson
    Member
    Theme Author

    Posted 1 year ago #

  5. noaneo
    Member
    Posted 1 year ago #

    hello,

    The images must be processed by the "add media" function.

    have the first image of a post as featured image, we must put a code in functions.php

    https://premium.wpmudev.org/blog/daily-tip-how-to-automatically-set-the-featured-image-in-wordpress/

  6. mavieth
    Member
    Posted 1 year ago #

    Alex, thanks for such quick response times and helpful posts. It makes the theme that much better!

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic