Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm trying to have my posts post on another page(blog) and my 'home' page display as my front page. Both pages have their own templates assigned to them (home for home, blog for blog).

In the Reading settings, I've set front page as home, posts page as blog. But when I go to url.com/blog, it displays the same template as my home page. I'm not sure why it won't display my two blog posts.

In my home.php template, I have the following code, could this be the issue?

<!-- Display featured images -->
<?php 
    $args = array('post_type'=> 'page');
    query_posts( $args );
?>

<!-- Get featured images -->
<div class="main-thumb left">
    <?php 
        if ( have_posts() ) {
            while ( have_posts() ) {
                the_post(); 
        ?>
            <li>
                <a href="<?php echo get_permalink(); ?>">
                    <div class="tint">
                        <div class="overlay caps">
                            <?php 
                                echo(types_render_field("top-overlay", array("output"=>"html")));
                            ?>
                            <?php 
                                echo(types_render_field("bottom-overlay", array("output"=>"html")));
                            ?>
                        </div> <!-- end .OVERLAY-->

                        <?php the_post_thumbnail(); ?>
                    </div> <!-- end .TINT-->
                </a>
            </li>
    <?php
            } 
        } 
    ?>
</div> <!-- end .MAIN-THUMB-->
share|improve this question

1 Answer 1

The posts page will always be index.php or home.php. That is, WordPress will always use one of those files to display your blog posts. Even if you set some other page in Settings (like 'blog'), WP will ignore everything set for that page except the title. See the codex.

share|improve this answer
    
Ah, okay, I understand. Didn't realize I also had to plug in some code into the template page. Thank you. –  vytfla Aug 13 '13 at 6:22
    
If you're hapy with my answer, please accept it (click the tick) so that other people with the same issue will know it is correct. –  vancoder Aug 13 '13 at 16:12

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.