Navigation
This is archived content. Visit our new forum.
  • Author
    Posts
  • #752608

    corwortman
    Participant

    Hi There,

    Is it possible to add a page title using short code in cornerstone?
    Or is there a different way to accomplish this?

    Thanks, Cor

    #752624

    Christopher
    Moderator

    Hi there,

    No, Page title should be added in Cornerstone/Settings tab/General.

    You can hide the page title and use custom headline element.

    Hope it helps.

    #752742

    corwortman
    Participant

    Thanks,

    So it is not possible to grap some wp-code to add the page title?

    #752793

    Paul R
    Moderator

    Hi,

    Regretfully, at this time I am not entirely certain what it is you would like to accomplish based on the information given in your post. If you wouldn’t mind providing us with a little more clarification on what it is you’re wanting to do ( perhaps some screenshots), we’ll be happy to provide you with a response once we have a better understanding of the situation.

    #752909

    corwortman
    Participant

    Hi there,

    Sorry….

    Instead of adding a page title manually, so by just adding a custom headline or text, it would be nice if I can give it title of the wordpress page. As you can see in the screenshot the name of the page is “Foto & Film”. So I just wondered if it is possible to add some code into the textfield of cornerstone to grap the page title from the wordpress backend. So if I change the page name I don’t have to change it on the page itself.

    But please don’t put to much time in this…..it is easy to solve manually by typing the page name.

    Thanks Cor

    #752983

    Paul R
    Moderator

    Hi Cor,

    You can add this in your child theme’s functions.php file.

    
    function page_title_shortcode( $atts ){
        $page_title = get_the_title();
        
        if($page_title) return $page_title;
    }
    add_shortcode( 'page_title', 'page_title_shortcode' );
    

    Then use this code to display your page title

    
    [page_title]
    

    Hope that helps.

    #753044

    corwortman
    Participant

    You guys Rock!!

    Thanks!

    #753053

    Darshana
    Moderator

    Glad we were able to help 🙂