• anonymized-14293447

    (@anonymized-14293447)


    Because my custom-post-types are created by users via the frontend, I end up having CPTs that pull their images from custom fields’ values. This results in any CPT without their “featured image”, thus making any plugin not recognize that each CPT does actually have an image associated to it.
    I would like to know if there’s a way of making the system translate any img src (i.e. the link to the image, i.e. the custom field’s value) as its “featured image”.

    I found an old and a recent posts, but I want to understand how it does apply to a theme.

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Setting _thumbnail_id meta value for a post is all there is to it. The only other part is when the best time to grab the value you need to save is. If it is being set as a custom field, the “update_{$meta_type}_metadata” action would be a good choice.

    I’m not sure what else you wish to understand. Once set, the theme can use the image in any way it sees fit.

Viewing 1 replies (of 1 total)
  • The topic ‘make img url into featured image’ is closed to new replies.