I’m using wordpress.org making a custom theme and I’m a complete PHP noob. It keeps saying something about bad syntax and my website just won’t appear. I wasn’t hacked I’m making my own custom theme and I just don’t know how to properly close everything. Anyway here is my index.php page. What am I missing? What am I not closing correctly? I would greatly appreciate the help!
<?php get_header(); ?>
<div id="main">
<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?>
<div id="posts">
<div id="post">
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<div class="post-thumb">
<a href="<?php the_permalink(); ?>"><?php the_post_thumbnail(); ?></a>
</div><!--POST-THUMB-->
<p class="lit"><?php the_content(''); ?></p>
<div id="price_buy">
<ul>
<li><?php echo get_post_meta($post->ID, "price", true);?>$</li>
<li><a target="_blank" href="<?php echo get_post_meta($post->ID, "buy", true);?>">BUY</a></li>
</ul>
</div>
<div id="share"><span class="cats">MORE:<?php the_category(', ') ?></span>
<p>SHARE</p>
<ul>
<?php if (get_option('lp_share_post_facebook') == "true") { ?>
<li>
<a href="http://www.facebook.com/sharer.php?u=<?php the_permalink();?>?t=<?php the_title(); ?>" title="Post to Facebook">
<img src="<?php echo get_template_directory_uri(); ?>/images/facebook-big.png" alt="Facebook" /></a>
</li>
<?php } ?><?php if (get_option('lp_share_post_twitter') == "true") { ?>
<li>
<a href="http://twitter.com/home/?status=<?php the_title(); ?> - <?php the_permalink(); ?>" title="Post to Twitter">
<img src="<?php echo get_template_directory_uri(); ?>/images/twitter-big.png" alt="Twitter" /></a>
</li>
<?php } ?><?php if (get_option('lp_share_post_email') == "true") { ?>
<li>
<a href="mailto:?subject=<?php the_title(); ?>&body=<?php the_permalink(); ?>" title="Email a Friend">
<img src="<?php echo get_template_directory_uri(); ?>/images/email.png" alt="Email" /></a>
</li>
<?php } ?>
</ul>
</div>
</div><!--POST-->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
I would highly recommend you get started on these tutorials: PHP & WordPress
This should probably fix your problem for now: