How to get page title in wordpress

HalfWebDev picture HalfWebDev · Dec 26, 2014 · Viewed 70.7k times · Source

Well, I have tried <?php echo get_the_title('About Us');?>

But the code is not working. I am using wordpress 4.1. This should work but it isn't. Has wordpress updated the functions?

Answer

Mohammad Al-amin picture Mohammad Al-amin · Oct 9, 2017

Try this one, It's may help you

<?php single_post_title(); ?>

Thanks :)