Custom Loop Errors
-
Hello
I want to be able to list a specified number of posts in a specific category on my index page. I have been able to do this for some time using the below code:
<?php query_posts('cat=4&showposts=4'); ?>
<?php while (have_posts()) : the_post(); ?><li id="post-<?php the_ID(); ?>">
<h2>
<a>" rel="bookmark" title='Permanent Link to "<?php strip_tags(the_title()); ?>"'><?php the_title(); ?></a></h2><small>
<?php comments_popup_link('<strong>0 <em>Comments</em></strong>', '<strong>No <em>Comments</em></strong>', '<strong>% <em>Comments</em></strong>', 'commentslink', '<span class="commentslink">Closed</span>'); ?>
</small>
|
<small>
By <?php the_author(',') ?> in <?php the_category(', ') ?>
</small>
|
<small>
<?php if (function_exists('time_since')) {
echo time_since(abs(strtotime($post->post_date_gmt . " GMT")), time()) . " ago";
} else {
the_time('F jS, Y');
} ?>
</small><?php link_pages('<strong>Pages:</strong> ', '', 'number'); ?>
<!--
<?php trackback_rdf(); ?>
--><div style="height: .25em; clear: both;"></div>
I rendered the posts from the category using the above code in a custom loop using the following include link in my Main index file;
<?php include (TEMPLATEPATH . '/theloop-news.php'); ?>
But for some reason overnight this has stopped working. On all of my WP sites using this technique. And I have asked my host and he says nothing has changed overnight and other WP installs are working normally on the same server.
I am getting errors like:
Parse error: syntax error, unexpected $end in /home/futcha/public_html/wp-content/themes/k2/theloop_casts.php on line 33
I am getting errors on Futcha Records. The website is currently offline. If it needs to be online for you to think of a solution I can put it back online. Although I dont think making website online is that important to this request as I just need a new way to query posts within categories in my custom loops on my Main index page.
- The topic ‘Custom Loop Errors’ is closed to new replies.