How to get topics on new php page?
-
How do I pull topics on to a new php page? Im trying to test macromedia and create a page from scratch.
I tried inserting this code:
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<h2 class=”storytitle” id=”post-<?php the_ID(); ?>”><?php the_title(); ?><?php comments_popup_link(__(‘0’), __(‘1’), __(‘%’)); ?></h2>
<div class=”post”>
<div class=”meta”><?php _e(“Posted by “);?><?php the_author(‘nickname’);?> <?php _e(” in “); ?> <?php the_category(‘,’);?> (<?php the_time(‘l F j, Y’); ?> at ” rel=”bookmark”><?php the_time()?>)
<?php edit_post_link(__(‘Edit This’)); ?>
</div><div class=”storycontent”>
<?php the_content(__(‘(more…)’)); ?>
</div><!–
<?php trackback_rdf(); ?>
–></div>
<?php comments_template(‘/comments.php’); // Get wp-comments.php template ?>
<?php endwhile; else: ?>
<?php _e(‘Sorry, no posts matched your criteria.’); ?>
<?php endif; ?><?php posts_nav_link(‘ — ‘, __(‘« Previous Page’), __(‘Next Page »’)); ?>
I got this error in result:
Fatal error: Call to undefined function: have_posts() in /home/taylorb/public_html/blog/Untitled-2.php on line 47Thanks,
AT
- The topic ‘How to get topics on new php page?’ is closed to new replies.