Well i tried <?php echo get_the_title('About Us');?>
<?php echo get_the_title('About Us');?>
But the code doesn't work. I am using wordpress 4.1. This should work, but it doesn't. Have Wordpress Features Updated?
Try this, it might help you
<?php single_post_title(); ?>
Thank:)
You are specifying incorrect parameters get_title . See codex .
get_title
codex
Instead, you would have to use ID to get the title.
ID
So your code will be
<?php echo get_the_title(13); //where 13 is the ID of the about us page ?>
NOTE. The parameters are optional.
Try this, maybe it will help you
<?php echo get_the_title(); ?>
And if you want to get the title of the page or post by id
<?php echo get_the_title(post->$ID); ?>
thank
You can try this
<?php echo get_page_by_title( 'About' ); ?>
Link
<?php $page = get_page_by_title( 'About Us' ); echo get_the_title($page->ID) ?>