How to Display Featured Posts with Thumbnails in WP Thesis Theme

by Surender on August 31, 2010

in How To,Themes,Wordpress

Thesis WordPress theme is one of the best Wp Theme,using by number of professional bloggers.It has number of options to display your blogging content as you like.Even you can customize thesis theme without using the wordpress plugins.I am talking about features posts in thumbnails hook.There are number of ways to display featured posts or the posts from specific category  in Thesis WordPress theme.

You can display feature posts in thumbnails with post titles anywhere on your wordpress blog.

featured posts thesis thumbnails thumb How to Display Featured Posts with Thumbnails in WP Thesis Theme

Before you read next,Here is my another list of blog posts related to Thesis WordPress theme:

  • How to Display Recent Posts Only with Titles in Thesis Theme Homepage
  • How To Display Adsense Ads After Post in Thesis Theme
  • Add Author Profile After Post in Thesis WordPress Theme
  • How to Customize Read More Link in Thesis Theme Homepage
  • How To: Display the Post Titles from Random Posts in a Specified Date Range
  • How To Add Subscription Box After The Post in Thesis WordPress Theme
  • How to Create 5 column footer widget in thesis theme
  • How to Add Google Search Box in Header Section of Thesis Theme
  • How to Add TweetMeme and Facebook button in Thesis WordPress Theme
  • How To : Solve Custom File Editor Issue in Thesis Theme
  • Customized Thesis Hook Code:

    First you would need to paste the code below in your custom_functions.php under the hook you want to display OR in the specific hook inserting box in open hook plugin setting page.

       1: <div class="relatedphotos">

       2: <h3>Editors' Picks</h3>

       3: <ul>

       4: <?php $recent = new WP_Query("cat=3&showposts=5&orderby=rand"); while($recent->have_posts()) : $recent->the_post();?>

       5: <li>

       6: <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php if ( function_exists("has_post_thumbnail") && has_post_thumbnail() ) { the_post_thumbnail(array(200,150), array("class" => "thumbs")); } ?></a>

       7: <br />

       8: <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a></li>

       9: <?php endwhile; ?>

      10: </ul>

      11: </div>

      12: <br>

    You can modified this hook as you want.If you want to display the posts from specific category,change the id of category and number of posts you want to display:

    Find the  given line  in the above code and add the parameter you want.

    <?php $recent = new WP_Query(“cat=3&showposts=5&orderby=rand”); while($recent->have_posts()) : $recent->the_post();?>

    Once you have done that then you can display it by updating the code.

    Custom CSS

    We are using custom CSS classes, so you would need them as well. Paste the following code in your custom_style.css file.

       1: .relatedposts {

       2: margin:0 0 0 0;background:#ffffff;

       3: border:1px solid #7de7f2;

       4: }

       5:

       6: .relatedposts h3{

       7: font-size:11px;border-bottem:1px dotted #ddd;display:block;

       8: margin:0 5px 5px 0;

       9: }

      10:

      11: .relatedposts ul{

      12: margin:0 0 15px 20px;

      13: padding:0;

      14: }

      15:

      16: .relatedposts ul li{

      17: margin:0 0 4px 0;

      18: background:url(images/rcomments.gif) no-repeat left;

      19: padding:1px 0 0 15px;

      20: list-style:none;

      21: }

      22:

      23: .relatedposts ul li a:hover{

      24: color:#fff;

      25: background:#ef2690;

      26: }

      27:

      28: .relatedphotos {

      29: margin-bottom:15px;margin-top:15px;padding:3px;

      30: border:1px solid #cecece;

      31: overflow:hidden;background: #eeeeee;

      32: -moz-border-radius:5px;

      33: -webkit-border-radius:5px ;

      34: border-radius:5px ;

      35: height:100%;

      36: }

      37:

      38: .relatedphotos h3{

      39: font-size:17px;border-bottom:1px dotted #cecece;

      40: margin:5px 20px 4px 5px;color: #61666C;font-weight:bold;

      41: }

      42:

      43: .relatedphotos ul{

      44: margin:0 0 15px 20px;

      45: padding:0;

      46: }

      47:

      48: .relatedphotos ul li{

      49: margin:0 20px 4px 0;

      50: padding:5px;

      51: list-style:none;

      52: display:inline;

      53: width:170px;

      54: float:left;font-size:12px;font-weight:bold;

      55: text-align:left;

      56: }

      57:

      58: .relatedphotos ul li a{

      59: color:#2B75BA;padding:2px;

      60: }

      61:

      62: .relatedphotos ul li a:hover{

      63: color:#333;

      64: }

    Save the file.You are able to display the posts with thumbnails from specific category now.

    Customization Curtsey :5Lemons

    Say Something:

    If you have additional solutions to this problem, please share it with us in the comments.

    Incoming search terms:

    • featured posts thesis
    • thesis featured posts
    • featured post in thesis
    • adding thumbnail to thesis category
    • thesis featured posts how to
    • thesis featured posts with thumbnails
    • thesis featured posts with title
    • thesis featured posts by category
    • thesis theme adding thumbnail to features
    • thesis theme featured posts

    Read More Related Stuff

    { 11 comments… read them below or add one }

    Kathy @ visitor health insurance July 16, 2010 at 3:34 pm

    That’s great! Is it really necessary that I should add the second coding in the .css file? Is that for the display of the thumbnails?

    Reply

    Moridin August 29, 2010 at 4:03 am

    This doesn’t work at all for me.

    Where should I insert the code for the custom_functions.php file exactly?

    add_action(‘thesis_hook_after_header’, ”);

    Also – deleting the line numbers after copy&paste is a bitch. :o )

    Reply

    peter @SQL Statements Tutorial September 7, 2010 at 8:22 pm

    This theme sounds interesting, I’ll try it in future.
    peter @SQL Statements Tutorial´s last [type] ..SQL LIKE

    Reply

    carsfresh September 8, 2010 at 9:37 am

    An automotive website with daily updates on new and future vehicles, motor shows, the tuning industry, classic cars and more.

    Reply

    delaila @ window lettering September 9, 2010 at 7:41 pm

    Is this really for real? I didn’t yet used this one.

    Reply

    jeffrey78 September 11, 2010 at 9:44 am

    Nice article, I am looking for it, thanks for sharing :)

    Reply

    Katya September 13, 2010 at 12:24 pm

    Thank you, this is a very helpful article and its not difficult to follow. Good job
    Katya´s last [type] ..A Comparative Android and iPhone Saga

    Reply

    Sourish @ Iphone 4 Jailbreak September 19, 2010 at 7:23 pm

    i guess you are having some trouble in your theme, Probably used traffic outbrain .
    showing this below post content , check out
    “”); } //OBEND:do_NOT_remove_this_comment //–> ”
    Sourish @ Iphone 4 Jailbreak´s last [type] ..HDR Camera Enabler – Free Cydia Jailbreak App

    Reply

    Hallucinate September 20, 2010 at 2:17 am

    Good post, thanks por sharing this article.

    Reply

    Web Design Cleveland October 1, 2010 at 6:01 pm

    Nice Post !!!!!!!!

    Reply

    zuhl February 23, 2012 at 3:45 am

    not working.. image not showing. crappp

    Reply

    Leave a Comment

    CommentLuv badge



    Previous post:

    Next post: