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.
If you’re using a mixture of Features and Teasers on your home page, you may want to add some type of “introductory content” just before your teasers. Here’s how to do this.
Place the following code in your custom_functions.php
file:
function teaser_intro($post_count) { if (is_home()) { if ($post_count == 1) { ?> <div class="teaser_intro"><p>HERE IS MY INTRO</p></div> <?php } } } add_action('thesis_hook_after_post_box','teaser_intro');
Note that the number 1
in the code represents the number of Features shown on your home page; if you have 2 Features showing, change the 1
to a 2
, etc.
Then, you can place this code in your custom.css
as the basis for your own desired styles to be applied to div#teaser_intro
:
.custom .teaser_intro { border:#000 solid 1px; background-color: #E7F8FB; padding:1em; margin:2em; }