-
-
I would like to add recent posts, as opposed to ‘popular posts’ to the footer and also have a thumbnail adjacent like the ‘popular post’ widget has.
Can you make the widget thumbnail link to the single-post please?
I inquired in the comments on themeforest and I was directed here to ask for support. Thanks
- This topic was modified 9 years, 5 months ago by inkline.
-
Hello,
Yes, please go to file \includes\widgets\codeless_mostpopular.php and find these lines:
echo '<dl class="dl-horizontal">'; if(has_post_thumbnail()) echo '<dt><img src="'.esc_url(codeless_image_by_id(get_post_thumbnail_id(), 'blog_grid', 'url')).'" alt=""></dt>'; echo '<dd>'; echo '<a href="'.esc_url(get_permalink()).'">'.esc_html(get_the_title()).'</a>'; echo '<span class="date">'.get_the_date().'</span>'; echo '</dd>'; echo '</dl>';
replace with these:
echo '<dl class="dl-horizontal">'; if(has_post_thumbnail()) echo '<dt><a href="'.esc_url(get_permalink()).'"><img src="'.esc_url(codeless_image_by_id(get_post_thumbnail_id(), 'blog_grid', 'url')).'" alt=""></a></dt>'; echo '<dd>'; echo '<a href="'.esc_url(get_permalink()).'">'.esc_html(get_the_title()).'</a>'; echo '<span class="date">'.get_the_date().'</span>'; echo '</dd>'; echo '</dl>';
Save file.
Best regards!
-
Viewing 1 reply thread
You must be logged in to reply to this topic.