help including functions….
-
I have a file news.php in staff/wp-content/themes/default/news.php and I included it into my index.php on my site. I get this error when loading the site.
Fatal error: Call to undefined function: have_posts() in /home/vxlabs/public_html/staff/wp-content/themes/default/news.php on line 1
Does anyone know what file I need to include in my news.php for it to display my posts on the homepage?
heres my news.php code
‘<?php if (have_posts()) : ?>
<?php while (have_posts()) : the_post(); ?><div class=”chead” id=”post-<?php the_ID(); ?>”>
<h2>” rel=”bookmark” title=”Permanent Link to <?php the_title(); ?>”><?php the_title(); ?></h2>
<small><?php the_time(‘F jS, Y’) ?> <!– by <?php the_author() ?> –></small><div class=”cbody”>
<?php the_content(‘Read the rest of this entry »’); ?>
</div><p>Filed under <?php the_category(‘, ‘) ?> | <?php edit_post_link(‘Edit’, ”, ‘ | ‘); ?> <?php comments_popup_link(‘No Comments »’, ‘1 Comment »’, ‘% Comments »’); ?></p>
</div><?php endwhile; ?>
<?php else : ?>
<div class=”chead”>
<h2>Not Found</h2>
</div>
<div class=”cbody”>
<p>Sorry, but you are looking for something that isn’t here.</p>
</div>
<div class=”cfoot”> </div><?php endif; ?>’
The topic ‘help including functions….’ is closed to new replies.