[Resolved] can't get get_post_thumbnail_url() to work
I’m trying to set the secondary featured image as a background image, but when I use the function it only just returns:
and not the proper url. Is this a bug, or am I implementing it wrong?
<li style=”background-image:url(‘<?php if (class_exists(‘MultiPostThumbnails’)) : MultiPostThumbnails::get_post_thumbnail_url(get_post_type(), ‘secondary-image’); endif; ?>
?>’);”><?php the_post_thumbnail(‘post-thumbnail’, array(‘alt’ => get_the_title(), ‘title’ => get_the_title())); ?>
Your help would greatly be appreciated!
- The topic ‘[Resolved] can't get get_post_thumbnail_url() to work’ is closed to new replies.