Hi, Can someone help me to call the_title inside an echo?
if($sample !== '') echo 'This story is about (the_title) . $sample .'</p>';
Thanks
Hi, Can someone help me to call the_title inside an echo?
if($sample !== '') echo 'This story is about (the_title) . $sample .'</p>';
Thanks
the_title() already displays the title. There is no need to use echo.
<p>This story is about <?php if ( $sample != '' ) the_title(); echo $sample; ?></p>
the_title() has the 'echo' parameter for not to echo the title:
http://codex.wordpress.org/Function_Reference/the_title
or use
get_the_title()
Thanks to you guys. I still have one more thing, probably the last with regards to custom field. I think I should post it separately.
You must log in to post.