ThemeShaper Forums » Thematic

Use of Filter or Hook to display single post on homepage

(3 posts)
  • Started 12 years ago by BriceIrvine
  • Latest reply from allancole
  • This topic is resolved
  1. BriceIrvine

    I'm looking for a simple way to isolate just one post on my home page using a Thematic filter or hook. I created a home.php page by duplicating the Thematic index.php.

    How and where might I insert the code:

       if (is_home()) {
    Posted 12 years ago #
  2. Put it somewhere before the loop.



    Posted 12 years ago #
  3. This did the trick for me:

    function single_post_on_homepage() { if(is_home()) { ?>
    <?php query_posts("showposts=1"); ?>
    <?php } }

    Just add that bit of code to your functions.php file.

    Posted 12 years ago #

RSS feed for this topic


You must log in to post.