Here is my index.php
<?php get_header(); ?>
<!-- BEGIN home -->
<div id="home">
<!-- BEGIN featured -->
<div id="featured">
<h2>Featured News</h2>
<?php include (ABSPATH . '/wp-content/plugins/featured-content-gallery/gallery.php'); ?>
</div>
<!-- END featured -->
<!-- BEGIN popular -->
<div id="popular">
<h2>Popular Articles</h2>
<ul>
<?php dp_popular_posts(7); ?>
</ul>
</div><div class="break"></div>
<!-- END popular -->
</div>
<!-- END home -->
<!-- BEGIN content -->
<div id="content">
<?php
$wp_query = $temp_query;
if (have_posts()) :
while (have_posts()) : the_post();
$arc_year = get_the_time('Y');
$arc_month = get_the_time('m');
$arc_day = get_the_time('d');
?>
<!-- begin post -->
<div class="post">
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<p class="date"><?php the_time('l, F j, Y') ?></p>
<?php dp_attachment_image(0, 'thumbnail', 'alt="'.$post->post_title.'"'); ?>
<?php the_excerpt(); ?>
<p class="details">
<span class="comments"><?php comments_popup_link('No Comments', '1 Comment', '% Comments'); ?></span>
<a class="readmore" href="<?php the_permalink(); ?>">Read full story »</a>
</p>
</div>
<!-- end post -->
<?php endwhile; ?>
<p id="postnav">
<?php next_posts_link('« Older Entries'); ?>
<?php previous_posts_link('Newer Entries »'); ?>
</p>
<?php else : ?>
<div class="notfound">
<h2>Not Found</h2>
<p>Sorry, but you are looking for something that is not here.</p>
</div>
<?php endif; ?>
</div>
<!-- END content -->
<?php get_sidebar(); get_footer(); ?>
But when I will look at the preview it keep son bothering this code:
- Code: Select all
Fatal error: Call to a member function have_posts() on a non-object in C:\xampp\htdocs\wordpress-2.7.1\wordpress\wp-includes\query.php on line 610
Please help. Thanks in advance and more power.









