Skip to main content
added 6 characters in body
Source Link
Tom J Nowell
  • 60.6k
  • 7
  • 77
  • 147

Using your example, you could...

<h4>echo<h4><?php echo get_the_title( $post_id ); ?></h4>

Or

$h4 = get_the_title();
echo '<h4>' . $h4 . '</h4>';

More on get_the_title().

Or you could use the_title().

the_title( '<h4>', '</h4>' );

Using your example, you could...

<h4>echo get_the_title( $post_id ); ?></h4>

Or

$h4 = get_the_title();
echo '<h4>' . $h4 . '</h4>';

More on get_the_title().

Or you could use the_title().

the_title( '<h4>', '</h4>' );

Using your example, you could...

<h4><?php echo get_the_title( $post_id ); ?></h4>

Or

$h4 = get_the_title();
echo '<h4>' . $h4 . '</h4>';

More on get_the_title().

Or you could use the_title().

the_title( '<h4>', '</h4>' );
Source Link
RiddleMeThis
  • 3.8k
  • 8
  • 21
  • 30

Using your example, you could...

<h4>echo get_the_title( $post_id ); ?></h4>

Or

$h4 = get_the_title();
echo '<h4>' . $h4 . '</h4>';

More on get_the_title().

Or you could use the_title().

the_title( '<h4>', '</h4>' );