Codeless
  • Support Home
  • Themes
  • Support
  • WordPress Tutorials
    • How to Start a Blog
    • Best Website Builders
    • Best Small Business Hosting
    • Email Marketing Services
    • Cheap WordPress Hosting
  • Video Tutorials

Community Forums

Latest Posts With Thumbnail

footerrecent postswidgets
    • 9 years, 11 months ago inkline
      Participant

      Expired

      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, 11 months ago by inkline.
    • 9 years, 11 months ago Mirela
      Participant

      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.

Login

Log In
Register

Renew Support

  • Renew Specular Support
  • Renew Tower Support
  • Renew Folie Support
  • Renew Handel Support
  • Renew June Support
  • Renew Picante Support
  • Renew Thype Support
  • Renew Regn Support

Search Forums

Forums

  • Bygge – Construction Theme
  • Converta – Software Theme
  • Folie – The WordPress Website Builder
  • Handel – Responsive Multi-Purpose Business Theme
  • June WooCommerce WordPress Theme
  • Livecast – Podcast Theme
  • Picante – Restaurant & Food WordPress Theme
  • Regn | Agency & Business WordPress Theme
  • Remake – Minimal Portfolio & Agency Theme
  • Specular – Multi-Purpose WordPress Theme
  • Suggest us Features
  • Tower – Business-Driven Multipurpose WP Theme
  • Vibrance – Photography Theme

Site Links

  • Support Policy
  • Specular Support Forum
  • Video Tutorials
  • Knowledge Base
  • Guides and Reviews

Useful Articles

  • Build a Website
  • Web Design & Development
  • Hosting
  • WordPress

Login

Log In
Register Lost Password