It is basically the same problem already posted here.
I am trying to add a second loop in my footer, in order to display a random post content (but only the part before the
However when I try to do so I get it to display the whole post entry when I am on single.php template, and not just the content before
Here is my code so far:
<?php $my_query = new WP_Query('showposts=1&orderby=rand'); while ($my_query->have_posts()) : $my_query->the_post(); ?> <a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title(); ?>"> <?php the_content('','FALSE',''); ?> <?php endwhile; ?>
Thanks for your help!