WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Put a post (from a category) into the header

[Resolved] Put a post (from a category) into the header

  • AardvarkGirl
    Member

    @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 ( http://wordpress.org/support/topic/want-to-put-single-custom-posts-in-header-and-footer?replies=12 )
    Danke in advance for the help.

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