Displaying Post in Header
-
Hello,
I’m trying to build my site so that it pulls a post with an image into my header on every page. The query is before the loop and seems to be messing up. I have been reading a lot of the stuff on the site, but can’t seem to figure it out. The closet I get to showing my post is the code below, but the only thing that shows up is a link to the post page. I want it to display the image in the post:<?php global $post; $myposts = get_posts('p=648'); foreach($myposts as $post) : ?> <div class="post single"> <div class="entry"> <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a> <?php the_content();?> </div> </div> <?php endforeach; ?>
Please help!
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Displaying Post in Header’ is closed to new replies.