Terminating PHP?
-
I’m using the following code to display a sinlge upcoming event at the very top of my websites home page, above the “blog” that will display all of the posts from another category.
<div id="home-nextevent"> <?php query_posts('category_name=events&showposts=1&meta_key=sortdate&orderby=meta_value&order=asc'); ?> <?php while (have_posts()) : the_post(); ?> <p><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></p> <?php endwhile; ?> </div> <!-- closes "home-nextevent" -->
However, this code appears to affect the remainder of the website, causing my blog section (still on the home/index.php page) to only display a single post.
I’m a PHP beginner, and I’m wondering if the event code needs to be terminated somehow, so that it doesn’t mess the rest of the page up. Is there an easy fix for this?
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Terminating PHP?’ is closed to new replies.