• Luke

    (@lukejongibson)


    I currently have the following code which worked fine for my last site having the static content first and then the blog roll, but now I need the static PAGE content to come after the blog roll. (I emphasize the word page, because I do not wish to insert static posts here. Only pages.) I already know about query_posts(‘p=x’); Which seems to be the solution given to other people who have asked a similar question. But that’s not what I’m after, unless somebody knows how that can be directed for pages instead. ??

    I have tried swapping them round but this just makes two blog rolls appear.

    Can you please help.

    Thanks

    <?php
    /*
    Template Name: Homepage
    */
    ?>
    <?php get_header(); ?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class="page-wrap">
      <div class="main-content">
    <div>
    <?php the_content(); ?>
    </div>
      </div>
    </div>
    <?php endwhile; endif; ?>
    <?php rewind_posts(); ?>
    <div style="position:relative; top:0px;margin:auto; width:1080px;"> <img src="<?php bloginfo("template_url");?>/images/main-content-bottom-border.png" alt="Dripping Border" /> </div>
    <br />
    <br />
    <div class="page-bottom">
      <div class="page-bottom-left">
        <h1 style="border-bottom:1px dashed #666; padding-bottom:8px; margin-bottom:30px; width:600px;">News:</h1>
        <div class="page-wrap2">
          <?php query_posts('posts_per_page=3'); ?>
          <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
          <div class="main-content2">
            <h3 class="violet"><a href="<?php the_permalink() ?>" rel="bookmark" title="Click here to read more">
              <?php the_title(); ?>
              </a></h3>
            <small>
            <div class="violet">
              <?php the_time('F jS, Y') ?>
              by
              <?php the_author_posts_link() ?>
            </div>
            </small> <br />
            <br />
            <?php the_excerpt(); ?>
            <a href="<?php the_permalink() ?>" class="read-more"></a>
            <div class="violet">
              <p class="postmetadata">Posted in
                <?php the_category(', '); ?>
              </p>
            </div>
          </div>
          <!-- main content 2 end -->
          <?php endwhile; else: ?>
          <p>Sorry, no posts matched your criteria.</p>
          <?php endif; ?>
        </div>
        <!-- page wrap 2 end -->
      </div>
      <!-- page bottom left end -->
      <div class="page-bottom-right">
        <h1 style="border-bottom:1px dashed #bcbcb0; padding-bottom:8px; margin-bottom:30px; width:400px; font-family: MyCustomFont;">Reviews:</h1>
    
      </div>
      <!-- page bottom right end -->
    </div>
    <!-- page bottom end -->
    <div class="clear"></div>
    <?php get_footer(); ?>
Viewing 1 replies (of 1 total)
  • Thread Starter Luke

    (@lukejongibson)

    I would also like to add I would be happy to look through the codex, but I have no idea what I would be searching for. So a link or the right key phase would be more than helpful. Cheers.

Viewing 1 replies (of 1 total)
  • The topic ‘Static page after blog roll’ is closed to new replies.