Quick example of PHP code needed to create a short code for Page Title.

 

function page_title_sc( ){
   return get_the_title();
}
add_shortcode( 'page_title', 'page_title_sc' );

 

Add this to functions.php file of your theme. This will create

[page_title]

shortcode that returns the page title.

Leave a Reply

Your email address will not be published. Required fields are marked *