Display Post Title with shortcode
-
Hi there,
Perhaps I have a basic question: how can I use a shortcode to display the current page title?
Thanks!
—
I’ve already tried it by adding this code to functions.php, but that did not work for me:function page_title_sc( ){ return get_the_title(); } add_shortcode( 'page_title', 'page_title_sc' );
and shortcode
[page_title]
The page I need help with: [log in to see the link]
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Display Post Title with shortcode’ is closed to new replies.