• Hi, I wanted to display the post title into the sticky header.

    So I found a way to do it by creating a shortcode:

    ——————————
    /* title to get the post title */
    function myshortcode_title( ){
    return get_the_title();
    }
    add_shortcode( ‘page_title’, ‘myshortcode_title’ );

    This is working excellent for desktop, since I can add html tags to [page_title] such as <h3>[page_title]</h3>

    Now, for some strange reason the theme or wordpress is not rendering the shortcode for mobile.

    Any ideas?

    • This topic was modified 7 years, 9 months ago by NameRequired.
  • The topic ‘Shorcode with “get_the_title()” not working on mobile’ is closed to new replies.