What am I doing wrong?
-
I keep getting errors with this piece of code.
I know for a fact that the header, footer, and sidebar are clean because I use them in a “page.php” and they work just fine.Here’s my code:
<?php /* Template Name: Main */ ?> <?php get_header(); ?> <div id="left"> <div id="home-postit"> <div id="twitter"> <h2 >Twitter Updates</h2> <a href="https://twitter.com/mrmunozteacher" target="_blank"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/latest-tweet-link.png" width="274" height="23" border="0px"/></a> <ul id="twitter_update_list"></ul> <script type="text/javascript" src="https://twitter.com/javascripts/blogger.js"></script> <script type="text/javascript" src="https://twitter.com/statuses/user_timeline/mrmunozteacher.json?callback=twitterCallback2&count=1"></script> </div><!-- end id="twitter"--> </div><!-- end id="home-postit"--> <div id="latest-post"> <?php query_posts('showposts=1'); ?> <?php while (have_posts()) : the_post(); ?> <div class="latest-date"><span class="month"><?php the_time('M') ?></span><br /><span class="day"><?php the_time('j') ?></span><br /><span class="year"><?php the_time('Y') ?></span></div> <h2><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2> <div class="latest-entry"> <?php the_excerpt(); ?> <a href="<?php the_permalink() ?>"><img src="<?php bloginfo('stylesheet_directory'); ?>/images/read-more.png" alt="Read more of <?php the_title(); ?>" width="87" height="50" class="read-more"/></a></div> <div class="latest-thumb"><?php the_post_thumbnail(); ?></div> <div class="clear"></div> <?php endwhile; else: ?> <p><?php _e('Sorry, no posts matched your criteria.'); ?></p> <?php endif; ?> </div><!-- end id="latest-entry"--> </div><!-- end id="left"--> <?php get_sidebar(); ?> <?php get_footer(); ?>
Viewing 11 replies - 1 through 11 (of 11 total)
Viewing 11 replies - 1 through 11 (of 11 total)
- The topic ‘What am I doing wrong?’ is closed to new replies.