I have this code in my header.php and it is working:
<div id="news">
<?php query_posts('category_name=news'); ?>
<?php while (have_posts()) : the_post(); ?>
<div class="new">
<a href="<?php the_permalink(); ?>">
<?php the_post_thumbnail('thumbnail'); ?>
</a>
<a href="<?php the_permalink(); ?>">
<h3><?php the_title(); ?></h3>
</a>
<?php the_excerpt(); ?>
<p>
<span class="autor">Author: <?php the_author(); ?></span> |
<span class="autor">Date: <?php the_date(); ?></span> |
</p>
</div>
<?php endwhile; ?>
</div>
Now, I would like to do something like:
<span class="views">Views: <?php the_views(); ?></span> |
to show each post how many times was read. However, it is throwing an error. How to solve this?
query_posts()! – Stephen Harris Oct 3 '12 at 9:25