I really hope someone can help me out!
I'm trying to implement code that I found on a blog, everyone says it works and everyone loves it. Here's the code:
<?php while(have_posts()) : the_post(); ?>
<h2><?php the_title(); ?></h2>
<ul>
<?php $totalposts = get_posts('numberposts=200&offset=0');
foreach($totalposts as $post) :
?>
<li>
<?php the_time('M j') ?> : <a href="<?php the_permalink(); ?>"><? php the_title(); ?></a>
Posted in: <?php the_category(', ') ?>
<?php comments_number('No Comments', 'One Comment', '% Comments' );?>
</li>
<? php endforeach; ?>
</ul>
<?php endwhile; ?>
Here's my template with the code in the (I think) correct spot:
<?php
/*
Template Name: Archives
*/
?>
<?php get_header(); ?>
<?php if (have_posts()) : ?>
<?php while(have_posts()) : the_post(); ?>
<!-- content starts here -->
<div id="content">
<!-- posts starts here -->
<div id="content_posts_wrapper">
<!-- individual post starts there -->
<div class="post">
<!-- begin content of post -->
<div class="page_content_post">
<h2><?php the_title(); ?></h2>
<div class="actual_post">
<ul>
<?php $totalposts = get_posts('numberposts=200&offset=0');
foreach($totalposts as $post) :
?>
<li>
<?php the_time('M j') ?> : <a href="<?php the_permalink(); ?>"><? php the_title(); ?></a>
Posted in: <?php the_category(', ') ?>
<?php comments_number('No Comments', 'One Comment', '% Comments' );?>
</li>
<? php endforeach; ?>
</ul>
</div>
</div>
<!-- end contet of post -->
<div class="clear"></div>
</div>
<!-- individual posts end here -->
<?php endwhile; ?>
<?php endif; ?>
</div>
<!-- posts end here -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>
But I'm getting this error:
Parse error: parse error, unexpected T_STRING in /home/content/c/o/l/collegemovie/html/wp-content/themes/dreamworks_redux1.4/archives.php on line 38
Any help anyone can provide I would be very much appreciative. Thanks so much in advance.