For a recent client project ( FutureCrimes.com ), they wanted to move the content typically found in a sidebar right in between the Featured posts and the Teasers. Luckily Chris Pearson added thesis_hook_post_box_bottom in the most recent release of Thesis.
Sticking code between the posts can be used to stick ads in the middle of the site, or anything else. If you want something to show up after certain posts, but not all, then follow this technique.
As a review, there's three conditions for hooks, with the third one being optional (and needed for this example). It goes:add_action('hook_name','function_name',position)On the site in question, we have 1 featured post followed by 10 teasers. So I'm going to use:add_action('thesis_hook_post_box_bottom','homepage_widgets',1);I then put all the code I wanted to show up after the first post in the function homepage_widgets().
Note that this will stick your function at the end of the first post box on every post, page and post aggregates (search, category, tag...). To limit it to just the homepage, your function should begin with if(is_home()): and end with endif;.
Adding Content Between Posts in Thesis
This shows you how to stick code between certain posts, but not all of them. It's very useful for including ads or other content you don't want repeated.
No comments yet