The_post_thumbnail( 'medium_large' ) // Medium-large resolution (default 768px x no height limit max) The_post_thumbnail( 'medium' ) // Medium resolution (default 300px x 300px max) The_post_thumbnail( 'thumbnail' ) // Thumbnail (default 150px x 150px max) You can also define your own image size by passing an array with your image dimensions: the_post_thumbnail() // Without parameter -> Thumbnail These image sizes can be configured in the WordPress Administration Media panel under >Settings > Media. The default image sizes of WordPress are “Thumbnail”, “Medium”, “Large” and “Full Size” (the original size of the image you uploaded). Get_post_thumbnail_id() – Retrieve Post Thumbnail ID. Get_the_post_thumbnail() – Retrieve Post Thumbnail. The_post_thumbnail() – Display Post Thumbnail. Has_post_thumbnail() – Check if post has an image attached. Set_post_thumbnail_size() – Registers an image size for the post thumbnail. Function ReferenceĪdd_image_size() – Register a new image size. If a user is unable to see it, they can enable it in their screen options.īy default, the Featured Image meta box is displayed in the sidebar of the Edit Post and Edit Page screens. Once you add support for Featured Images, the Featured Image meta box will be visible on the appropriate content item’s Edit screens. To enable Featured Image only for specific post types, see add_theme_support() Setting a Featured Image
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |