• Resolved chris

    (@brokeup)


    I am trying to make posts with a featured image display on the homepage post different than the posts I want in the Blog section of my site. I am assuming the best way to do this with 3.0 is still through a category-ID.php? Currently the posts show up the way I want them, but it’s because I have my index.php file setup that way. I know that’s not the way to do it, since that spans across the entire site. I have read through much of the category ID forum posts but can’t seem to wrap my head around it… can anyone simplify this for me?

    http://www.chrissciolla.com/test

Viewing 6 replies - 1 through 6 (of 6 total)
  • What you could do is set up a front-page.php file. You can then style this one differently and it will only be used on your home page.

    Thread Starter chris

    (@brokeup)

    so how do I get specific posts to show up on the front-page.php file? that’s where I am confused. I know there is a good amount of php that needs to go into the loop in the index.php as well as front-page.php, correct?

    You would need to set up a custom query before the Loop in front-page.php.

    Thread Starter chris

    (@brokeup)

    ok, correct me if I’m wrong here. this is what I would put in my front-page.php before the loop.

    if (is_home()) {
    query_posts('category_name=portfolio');
    }

    how do I make sure my front-page.php is always the home page?

    <?php
    $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
    $args= array(
    	'category_name' => 'Portfolio',
    	'paged' => $paged
    );
    query_posts($args);
    ?>

    – otherwise your next/previous pagination won’t work correctly.

    how do I make sure my front-page.php is always the home page?

    If the front-page.php file exists within a theme, it is used automatically for the static front page. You don’t have to do anything.

    Thread Starter chris

    (@brokeup)

    worked perfectly. thanks!!

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘Help making portfolio posts different from blog posts’ is closed to new replies.