Glossary Term
set_post_thumbnail()
3 tags
1 category
set_post_thumbnail() — Sets the post thumbnail (featured image) for the given post.
Inputs: $post (int|WP_Post): Post ID or post object where thumbnail should be attached. $thumbnail_id (int): Thumbnail to attach.
Returns int|bool: Post meta ID if the key didn’t exist (ie. this is the first time that a thumbnail has been saved for the post), true on successful update, false on failure or if the value passed is the same as the one that is already in the database.
Term Connections
Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.
Loading term connections…
