This document is deprecated! The information on this page refers to a Thesis version that is now obsolete. Please visit the Thesis Docs for current documentation.
The Thesis Feature Box is handy for a variety of purposes, and among these is highlighting a specific post from your blog. Once you’ve configured your Feature Box based on the information in Using Feature Box Options, you can add the following code to your custom_functions.php
file to add your desired post to the Box:
function fbox_post() { query_posts('p=117'); if (have_posts()) : the_post(); ?> <div <?php post_class($classes); ?> id="post-<?php the_ID(); ?>"> <div class="headline_area"> <h2 class="entry-title"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent link to <?php the_title(); ?>"><?php the_title(); ?></a></h2> <?php thesis_byline(); echo "</div>\n"; $post_image = thesis_post_image_info('thumb'); echo "\n"; echo "\t\t\t\t<div class=\"format_text entry-content\">\n"; echo $post_image['output']; the_excerpt(); echo "\t\t\t\t</div>\n</div>\n"; endif; wp_reset_query(); } add_action('thesis_hook_feature_box','fbox_post');
Note that you will need to change the 117
in this line here to be the ID of the post you wish to highlight:
query_posts('p=117');
Once you save the changes to your custom_functions.php
file, view your refreshed site to see your new Feature Box with your desired post on display: