I’m trying to piece this together but having trouble.
I’ve created a template to use so that it only shows my category 4 (Blog category posts) which my Blog page template has been set to. I’m getting this error:
Parse error: syntax error, unexpected T_ENDWHILE in /home/vegas/public_html/styleuncensored.com/wp-content/themes/lightword/page-blog.php on line 18
The code is as such:
<?php get_header(); ?>
<div id="content-body">
<?php if ( function_exists('yoast_breadcrumb') ) { yoast_breadcrumb('<p id="breadcrumbs">','</p>'); } ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php if (in_category('4') ) { ?>
<div <?php if (function_exists("post_class")) post_class(); else print 'class="post"'; ?> id="post-<?php the_ID(); ?>">
<h2><a title="<?php the_title(); ?>" href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<?php edit_post_link(__('Edit this page','lightword'), '', ''); ?>
<?php the_content(''); ?>
<?php if(function_exists('wp_print')) { print_link(); } ?>
<?php wp_link_pages('before=<div class="nav_link">'.__('PAGES','lightword').': &after=</div>&next_or_number=number&pagelink=<span class="page_number">%</span>'); ?>
</div>
<?php if ( comments_open() && $lw_disable_comments == "false" ) : comments_template(); endif; ?>
<?php } else { ?>
<?php endwhile; else: ?>
<h2><?php _e('Not Found','lightword'); ?></h2>
<p><?php _e("Sorry, but you are looking for something that isn't here.","lightword"); ?></p>
<?php endif; ?>
<?php } ?>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>
I understand that this is simply a formatting issue. I’ve gotten it to load with no errors, but then no posts show up on the page…a little help?