<figure>
<?php echo get_the_post_thumbnail( null, $size, $attr ); ?>
<figcaption>here goes your caption</figcaption>
</figure>
for the_post_thumbnail check : https://developer.wordpress.org/reference/functions/the_post_thumbnail/
Related Posts:
- Stop WordPress Wrapping Images In A “P” Tag
- Stop WordPress automatically adding tags to post content
- Get content from one page and show it on another page
- Strategy for handling hierarchical pages with empty parent content
- How to remove Nextpage tag inside posts text depending of utm_campaign
- Remove image caption from post excerpt
- How can you make sure authors’ posts are longer than 250 words?
- What is the best / efficient way to get WordPress content by post id and why?
- JSON not valid after json_encode posts
- Add default content to post (for specific category)
- Programmatically inserting page breaks
- Get post embedded image caption
- Hide parts of the post content on the home page
- Filter/Remove HTML Elements on all posts and pages
- Paragraphs removed when using get_post_custom()?
- Load post content into div with ajax
- Testing for post title in ‘if/else’ statement returns no content
- Remove inline width from figure
- Underscores.me retrieve next / previous post thumbnail in post_nav function
- Same content shared between multiple posts?
- how load content as pop-up using ajax
- How to get only text from wordpress post content?
- Batch process: remove first image from post content
- Show featured image next to post-teasers in Genesis Framework?
- Why content_arr[‘extended’] removes paragraph tags?
- Unautop / Sanitize content added to a post through a plugin
- is there a way to show the the post title after the image?
- How to get rid of shortcodes in post content once and for all
- Add Word Limit to Posts
- Show only one page link in content pagination
- Show only posts with images and a fixed amount of posts
- How to create new post content templates for my users?
- How do I do a page break?
- How to get a post’s content? [closed]
- Why does a published post only displays the title and not the content in the site? [closed]
- related author post thumbnail shows post thumbnail
- Admin – no Featured image choice in create new/page|post
- Best Way to Add UnEditable HTML to Posts
- The_excerpt() doesn’t parse – how to change that?
- Page and post loop same template
- Benefits to using semantic HTML in post content? [closed]
- the_content() Not Grabbing All Content
- Can’t save WordPress post with “/etc/” in it
- content summary of a post disappears If an images added at the beginning of the post. how to solve it?
- Hide parts of the post content after typing it’s name or searching it by category
- How to exclude the word “class” from being matched in search?
- Preview page/post revisions without overwriting current content
- Posts and Pages w. private visibility don’t show up in existing content
- definining own teaser text for post
- Add text and change style to post programmatically depending on category
- why my urdu text is not aligned properly when written in wordpress blog post?
- How to Remove HTML Elements from Post Excerpt?
- My website is showing today’s date instead of published date since db migration to a new wordpress
- Related post not showing table of content
- How to get unmodified post content?
- I have inserted a post’s content in homepage.php by the post-id. The font isn’t matching with the theme. How do I change font of this content?
- How do I set content in my pages so that it remains permanent while blog posts are added below?
- Nothing appears using get_the_excerpt() in category.php
- WordPress each user has each content for a page,how to do that?
- Adding div to WordPress page content
- Adding editable content above posts
- How to get post_content while the post is being edited
- Custom template for different post types
- Correcting the content width when sidebar is inactive?
- Thumbnail With Next/Prev Links Not Showing Next Post?
- Multiple approval from editors before publishing?
- SQL query to remove first image in all posts
- Get part of a page url
- Get post id on click of thumbnail
- How can i show only 30% of the “the_content(“More…”)”?
- How to use wp_editor(); in functions.php then retrieve content in the template
- Add default content to post (for specific category)
- jquery: getting contents of #content field on post page
- Stripping tag from elements in post
- What does WordPress mean by they have full rights to content [closed]
- After the local installation of an old WP website I can see the homepage but I can’t access to the articles, why?
- wordpress pinboard theme [closed]
- Automatically search and replace link in content (pages/posts)?
- Notify/check if the content of a custom gutenberg block has changed on save_post
- How to Create Editable Blocks of Text for the Homepage?
- Set Post Title to Read-only and Disable Permalink Slug Editor in Gutenberg
- how to get permalink using sql
- how to display full post with pagination on home page
- how to grab first link in post… and of course call it
- What Defines What Category A Post Picks (if in multiple)
- Show info to author only
- Two loops, one AJAX loop, exclude posts in first loop from second loop, loops are in different files
- updating a post doesn’t trigger a function
- Updating post data on save (save_post vs wp_insert_post_data)
- Lost draft under all posts and drafts
- “edit_published_posts” and “edit_other_post” issue
- Does WP automatically tag posts into the archive?
- Shortcode for tables which can include comma and linebreaks
- How can I pass form entry to another form on a new page
- calling pages instead of posts
- Expired Post with More Recent Time Stamp?
- Post preview in iframe without saving the post
- How to get only current images of a post
- How to Include a common category in a custom Category Search
- Show Next/Previous without Link