Hi @
welly,
As far as I can see, you can pull post's image from WP using the 'get_the_post_thumbnail' method:
https://developer.wordpress.org/reference/functions/get_the_post_thumbnail/
In that sense, you can edit
Code:
\XLite\Module\QSL\WordPress\View\Plugins\RecentPosts\AWidget
class and define your own version of the getHTMLContentWidget() method which is responsible for displaying the menu widget.
I have just quickly tried to replace this piece of code:
Code:
echo '<h5 class="entry-title"><a href="' . get_permalink() . '" rel="bookmark">' . get_the_title() . '</a></h5>';
with the next one:
Code:
echo '<h5 class="entry-title"><a href="' . get_permalink() . '" rel="bookmark">' . get_the_title() . '</a></h5>';
echo get_the_post_thumbnail();
and it has kind of worked out.
Let me know if you need any further help.
Tony
Quote:
Originally Posted by welly
I have attached two images. One shows what I created in XC4 using xCMS (Smack Digital), and the other shows what I have done so far with XC5 and the Blog System module. Formatting and layout aside, you can see that in the XC4 version, each post shows the image, and that is what I want to create in XC5.
I just don't know how to obtain the image so that I can display and style it.
|