Hi – is it possible to display the category of a post along with it’s title and date in the Latest News widget?
So the widget would display:
Post Title
Post Category
Post date & time
for each post displayed.
Is that possible? – Thanks.
Hey pozza!
Open up /enfold/framework/php/class-framework-widgets.php and on line 532 you should see this.
echo "<strong class='news-headline'>".get_the_title();
Add this on the next line.
$cats = get_the_category();
foreach ( $cats as $cat ) {
echo '<br /><span class = "widget_latest_category">'.$cat->cat_name.'</span>';
}
And you can style it with this CSS.
.widget_latest_category { }
Best regards,
Elliott
Thank you!
That’s perfect – cheers.