Parse error when trying to exclude categories from home page
-
I’m trying to edit my template so that only posts from a specified category will show up on the main page. I’ve read every page I can find about how to do it and it always ends up with a parse error. I don’t fully understand php syntax, so it’s impossible for me to go troubleshooting and I am at my wit’s end ’cause I’m sure it’s something simple. So can anyone point out why this code gets me this error: Parse error: syntax error, unexpected T_ELSE in /home/.dinny/unoriginal/fuzzystars.net/wp-content/themes/fuzzystars/index.php on line 37
<?php get_header(); ?> <?php get_sidebar(); ?> <div id="content"> <?php if (is_home()) { query_posts("cat=12"); } ?> <?php while (have_posts()) : the_post(); ?> <div class="post"> <h2 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></h2> <small><?php the_time('F jS, Y') ?> <!-- by <?php the_author() ?> --></small> <div class="entry"> <?php the_content('Read the rest of this entry »'); ?> </div> <p class="postmetadata"><img src="<?php bloginfo('template_directory'); ?>/images/folder_edit.png" alt="category"></img> <?php the_category(', ') ?> <img src="<?php bloginfo('template_directory'); ?>/images/comments.png" alt="comments"></img> <?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?> <?php edit_post_link('//Edit'); ?></p> <!-- <?php trackback_rdf(); ?> --> </div> <?php endwhile; ?> <div class="navigation"> <div class="alignleft"><?php posts_nav_link('','','« Previous Entries') ?></div> <div class="alignright"><?php posts_nav_link('','Next Entries »','') ?></div> </div> <?php else : ?> <h2 class="center">Not Found</h2> <p class="center"><?php _e("Sorry, but you are looking for something that isn't here."); ?></p> <?php include (TEMPLATEPATH . "/searchform.php"); ?> <?php endif; ?> <?php get_footer(); ?>
Viewing 5 replies - 1 through 5 (of 5 total)
Viewing 5 replies - 1 through 5 (of 5 total)
- The topic ‘Parse error when trying to exclude categories from home page’ is closed to new replies.