I have the code below for a category in WordPress. It displays the name of the category when I want it to be displaying the title of the post. How do I get it to display the title of the post proper.
<? query_posts('category_name=implants');
?>
<h3><?php single_cat_title(); ?></h3>
<?php if (have_posts()) : while (have_posts()) :
the_post(); ?>
<?php the_content( __('Read the
rest of this page »', 'template')); ?>
<?php endwhile; endif; ?></p>
default WordPress Loop. Use WP_Query instead for standard WordPress
queries.
exactly what it looks like: You’re pulling the title of the queried
category. You want to call the_title() to grab the post title.
than <?php. You should make it a habit of specifying your server-side language to avoid potential future problems, even though it might not be initially apparent.
Here’s what your revised loop should look like: