Log in

View Full Version : Resolved categoy.php wordpress



europe451
05-21-2011, 03:14 AM
So this is probably something very simple that I just don't see.


<?php get_header(); ?>

<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<br />

<div class="content">

<div id="sidebar-left">
<ul class="sidebar-left_inner">
<?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar('Sidebar-left') ) : ?>
</ul>
<?php endif; ?>
</div><!-- end sidebar-left -->

<div class="content-sub">
<?php
$category_description = category_description();
if ( ! empty( $category_description ) )
echo '<div class="archive-meta">' . $category_description . '</div>';

/* Run the loop for the category page to output the posts.
* If you want to overload this in a child theme then include a file
* called loop-category.php and that will be used instead.
*/
get_template_part( 'loop', 'category' );
?>

</div><!-- end content-sub -->

<?php get_sidebar(); ?>
<?php get_footer(); ?>

but I am getting "Parse error: syntax error, unexpected $end in" on the last line, when I call the footer.

I don't know if this is something in my functions.php or in the category.php but if more info is needed, just let me know.

Thanks

traq
05-21-2011, 08:06 PM
check your footer.php for an improperly closed string, comment, etc.

this error means that php can't find the end of the script (e.g., an unclosed string is causing the end of a function to not be evaluated, etc.).

europe451
05-28-2011, 06:02 PM
Thanks traq,

but for some reason the "have_post" line was too high.

I moved it down into the content-sub div and it worked.