500 Error for Posts and Post Comments
-
I’ve been working on my blog for a few weeks now, and I’ve just realised that blog single posts and comment posts are returning a 500 error in my browser. Permalinks are turned on with the value being
%postname%/I have read elsewhere and tried the following solutions I’ve found on this forum and others;
– .htaccess to include mod_rewrite solution
– modified httpd.conf to allow mod-re_write
– wp_posts database changes to allow negative valuesWebsite is http://www.262oh.com.au – (don’t be too critical, it’s still being developed). Any thoughts? I don’t susepct it’s a .htaccess problem, as other pages are working. It seems only to happen to single and comments pages.
Below is the code for single.php:
<?php get_header(); ?> <div id="content"> <?php $blog = get_cat_id(get_option('rascals_blog')); global $more; $more = 0; if (have_posts()): ?> <?php while (have_posts()): the_post();?> <div class="entry"> <div class="entry-top"> </div> <div class="entry-content"> <h1><a href="<?php the_permalink();?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title();?></a></h1> <?php the_content('[ read more ]');?> </div> <!-- end entry-content --> <div class="entry-bottom"> </div> <?php if (in_category($blog)) : ?> <div class="post-meta-data"> <p>Posted <?php the_time( 'M j, Y' ); ?> in <?php the_category( ', ' ); ?> </p> <a href="<?php the_permalink() ?>#comments" title="Comments" class="comments"><?php comments_number( '0','1','%' ); ?></a> </div> <? endif; ?> </div> <!-- end entry --> <?php endwhile;?> <?php else :?> <div class="entry"> <div class="entry-top"> </div> <div class="entry-content"> <h1>Error - 404</h1> <p> Sorry the page you are looking for does not exist </p> </div> <!-- end entry-content --> <div class="entry-bottom"> </div> </div> <!-- end entry --> <?php endif;?> <!-- comments --> <?php if( 'open' == $post->comment_status ) comments_template(); ?> <!-- end comments --> </div> <!-- end content --> <div id="sidebar"> <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Single Post Sidebar') ) : ?> <?php endif; ?> </div> <!-- end sidebar --> </div> <!-- end wrapper --> <?php if (!in_category($blog)) {include(TEMPLATEPATH . '/footer.php');} else { include(TEMPLATEPATH . '/footer-blog.php');}; ?> </blockquote>
The topic ‘500 Error for Posts and Post Comments’ is closed to new replies.