Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options not deleted user 11135

Post Thumbnail is a theme feature introduced with Version 2.9. Thumbnail is an image that is chosen as the representative image for Posts, Pages or Custom Post Types.

121 votes
Accepted

How do I set a featured image (thumbnail) by image URL when using wp_insert_post()?

You can set an image as post thumbnail when it is in your media library. To add an image in your media library you need to upload it to your server. WordPress already has a function for putting images …
Rob Vermeer's user avatar
  • 5,176
3 votes

PHP/Manual use of images? - 2 Questions

Function Reference/wp insert attachment $image_id = wp_insert_attachment( $attachment, $filename, $parent_post_id ); This function will return an image id which you can use for the featured image. …
Rob Vermeer's user avatar
  • 5,176