Topic: Extract last post image (Snippet)
You need Blog plugin
<?php
// Get post block
$str = Blog::getPostsBlock();
// Find inages of all posts
preg_match_all('@<img.*src="([^"]*)"[^>/]*/?>@Ui', $str, $out);
// Get first image of last post
$img = $out[1][0];
// Show image if you like add class or style
echo '<img src=" '.$img.' ">';
?>Get snippet
{snippet get="name of snippet" }..::: Moncho Varela ::::.. ..::: @Nakome ::::.. ..::: Github ::::..
