How to use html tags within the loop
-
Hi,
I am trying to use html tags within my loop like this:
<?php query_posts('cat=5&posts_per_page=1'); if (have_posts()) : while (have_posts()) : the_post(); <strong>the_title();</strong> the_content(); endwhile; endif; ?>
Yet, I keep getting parse errors when I try and style the_title(); with a
<strong>
tag.I am using the Starkers theme which has this template code:
<?php /** * Template Name: Home Page * * @package WordPress * @subpackage Starkers * @since Starkers HTML5 3.0 */ get_header(); ?> <?php get_template_part( 'loop', 'home' ); ?> <?php get_footer(); ?>
this calls another php file called loop-home.php with the first snippet of code I added at the beginning.
Many thanks!
[Please post markup & code snippets between backticks or use the code button.]
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘How to use html tags within the loop’ is closed to new replies.