Hi @yellow82,
About using remote picture as featured image please try this plugin.
https://ww.wp.xz.cn/plugins/featured-image-from-url/
Thanks,
No add this plugin pictures WordPress loads Pictures library. I would like to show you the first picture url , But I could not do it exactly
How do i help please
I could not do it with that
A similar code:
functions.php
function catch_that_image() {
global $post, $posts;
$first_img = '';
ob_start();
ob_end_clean();
$output = preg_match_all('/<img.+src=[\'"]([^\'"]+)[\'"].*>/i', $post->post_content, $matches);
$first_img = $matches[1][0];
if(empty($first_img)) {
$first_img = "/path/to/default.png";
}
return $first_img;
}
loop.php
if ( get_the_post_thumbnail($post_id) != ” ) {
echo ‘‘;
the_post_thumbnail();
echo ‘‘;
} else {
echo ‘‘;
echo ‘<img src=”‘;
echo catch_that_image();
echo ‘” alt=”” />’;
echo ‘‘;
}
Hi @yellow82,
About this you can managed with theme customization. So please mail us on [email protected].
Thanks,