Page Thumbnail background
-
Hi there,
I am trying to use the featured image of a page as the background image of a div on my static page.
<?php $page = get_post_by_title( 'About' ); $thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'full' );?> <div class"aboutright" style="background-image: url('<?php echo $thumb['0'];?>')"></div>
Thanks very much for any help.
Cheers,
Phil
- The topic ‘Page Thumbnail background’ is closed to new replies.