Support » Fixing WordPress » Put a post (from a category) into the header

  • Resolved AardvarkGirl


    I know just enough to be dangerous.

    I’m using this in the header, but (and probably obvious to some of you) it is putting THAT post into the content area of every page of the site. 😛

    The code I’m using in the header:

    <?php query_posts('category_name=header-post&posts_per_page=1'); ?>
            <?php while (have_posts()) : the_post(); ?>
         <?php the_title(); ?>
         <?php the_excerpt(); ?>
                      <?php endwhile; ?>

    With the thought that if someday the client deletes the original post (not calling that one post in by its ID number) that they can put another post in the category ‘header-posts’ and be back on track.

    But obviously this is mucking things up. 🙂

    I searched the web and found a few articles that really didn’t help ( )
    Danke in advance for the help.

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Put a post (from a category) into the header’ is closed to new replies.