WebBy default, you will start in the Block section. Click on the Document section. Scroll down until you have found the Featured Image from URL option. In it, you will find a text box to paste the image URL. Paste your image’s URL here. You can click on the “Preview” button to see what the image looks like. WebOct 5, 2024 · $url = wp_get_attachment_url ( get_post_thumbnail_id ($post_id) ); Or if you want to get the image by image size. $src = wp_get_attachment_image_src ( get_post_thumbnail_id ($post_id), 'thumbnail_size' ); $url = $src [0]; http://codex.wordpress.org/Function_Reference/get_post_thumbnail_id
Web3 rows · wp_get_attachment_image_url() wp-includes/media.php: Gets the URL of an image attachment. ... WebOct 12, 2024 · Sorted by: 1 I found out that I can use _embedded. So my code become: export default withSelect ( (select, props) => { return { posts: select ('core').getEntityRecords ('postType', 'my_portfolio', 'per_page: 20', '_embed: true') } }) (PortfolioPostsEdit); Then I can get my featured image by post._embedded ['wp:featuredmedia'] [0].source_url leg heaviness causes
How to Get Featured Image URL in WordPress (Code …
WebJan 1, 2024 · Add a Dynamic Fullwidth Image with a Text Module. First, open the settings for the Section that includes the post details and remove the gradient and dynamic image from the Section’s background. Next, set the Section’s background to white and close the settings. Background: #ffffff. WebOct 13, 2015 · I was able to create a post with an image id from uploading an image (ionic mobile). I found the secret sauce by examining the the json response from wp-json/wp/v2/posts/id. In the data section I saw "featured_media", I had read that I needed to set "featured_image" to an id but that didn't work. WebI'd suggest anyone doing this consider the following adjustments: Get the ID of the current page/post/index using get_queried_object().For a blog index that's set to a page this will return the correct page ID. leg heat pads