How to make my plugin compatible with external images
-
Hello,
I am working on a slider plugin and I would like to make it compatible with your external featured image plugin.
Right now my slider only display this as an output, although the posts have external images:
https://www.example.cp,/wp-includes/images/media/default.pngI guess it’s because I am not using WordPress standards to output featured images.
Just to double check. To make it work, I have to use
the_post_thumbnail()
?Because doing it like this, does not seem to work:
$thumb_id = get_post_thumbnail_id($post_id); $thumb_url_array = wp_get_attachment_image_src($thumb_id, 'thumbnail-size', true); $thumb_url = $thumb_url_array[0];
Basically, I am trying to just get the URL instead of the whole markup around it, so that I can better design it.
Is there another way to just retrieve the URL?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘How to make my plugin compatible with external images’ is closed to new replies.