How to output template tags without having a <p> enclose them?
-
I have this code here
<?php $rand_posts = get_posts('post_type=post&numberposts=5&orderby=RAND()'); foreach( $rand_posts as $post ) : setup_postdata($post); ?> <p><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a><?php the_excerpt(); the_category(', ') ?></p> <?php endforeach; ?>
in which the <p> tag is called only once per iteration of the loop, but somehow the output has a <p> tag enclosing the output of the_title, the_excerpt, and the_category. Is there any way to output these 3 items in a single continous line without any <p>’s enclosing them?
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘How to output template tags without having a <p> enclose them?’ is closed to new replies.