What do you want to save?
Add Code snippet
New code examples
-
PHP 2021-10-22 18:35:13
wp+get feature image
<?php if (has_post_thumbnail( $post->ID ) ): ?> <?php $image = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ), 'single-post-thumbnail' ); ?> <div id="custom-bg" style="background-image: url('<?ph... Add solution -
PHP 2021-10-04 07:36:02
get featured image id wordpress
if ( has_post_thumbnail()) { $large_image_url = wp_get_attachment_image_src( get_post_thumbnail_id(), 'large'); echo '<a href="' . $large_image_url[0] . '">'; the_post_thumbnail('thumbn... Add solution