Forums

Pages pulling my headlines (6 posts)

  1. bremmerm
    Member
    Posted 2 years ago #

    I have a website and in the header.php I have this:

    <?php query_posts('page_id=35'); ?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <?php the_content('<p class="serif">Read the rest of this page &raquo;</p>'); ?>
    <?php endwhile; endif; ?>

    The code above pulls a post.

    For all sub pages (page.php) i use the following code:

    <h1> <?php the_title();?></h1>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <?php the_content('<p class="serif">Read the rest of this page &raquo;</p>'); ?>
    <?php endwhile; endif; ?>

    When you view pages it will not show what is suppose to be on that page it instead shows whats suppose to be in the header.php.

    Any idea what I am suppose to use to pull posts or pages if I want to include it in the header?

  2. bremmerm
    Member
    Posted 2 years ago #

    Incase you would like the link its

    cov.lawrencemg.com

  3. bremmerm
    Member
    Posted 2 years ago #

    No help???

  4. alchymyth
    The Sweeper
    Posted 2 years ago #

    try to put
    <?php wp_reset_query(); ?>

    after your

    <?php query_posts('page_id=35'); ?>
    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <?php the_content('<p class="serif">Read the rest of this page &raquo;</p>'); ?>
    <?php endwhile; endif; ?>

    in header.php

  5. bremmerm
    Member
    Posted 2 years ago #

    Winner Winner Chicken Dinner! That worked. Thanks for your help.

  6. alchymyth
    The Sweeper
    Posted 2 years ago #

    you are welcome.

    'good things come to those who wait'

Topic Closed

This topic has been closed to new replies.

About this Topic