This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Layout Builder – how to show current page's Title

  • Creator
    Topic
  • #1879
    mharpen
    Participant

    Is there a way to tell the Layout Builder to show the current page’s Title? I can use the Headline element, but if I use the layout on multiple pages, it would show the same headline. Is there a shortcode perhaps I could use in the Header element’s Header Text field? Thank you.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Author
    Replies
  • #1884
    Jason Bobich
    Keymaster

    Hello,

    No I apologize but there is no feature for this. I’ve got a feature for this added for the next update though for the Header element. Although the the custom layouts weren’t really designed with the intention of them being used for multiple pages, However, in the next update, you’ll be able to edit each custom layout directly from the Edit Page screen (additionally from editing them from the Layout Builder interface). So this will all make a little more sense conceptually.

    Right now, you couldn’t use a shortcode because the header element does not render shortcodes. The only real logical way to do it I think would just be to re-do the themeblvd_headline function found in /framework/frontend/functions/builder.php. You’d copy this to your Child theme and paste it in your functions.php before the framework is included.

    function themeblvd_headline( $options ) {
    	global $post;
    	$output = '<'.$options['tag'].' class="text-'.$options['align'].'">';
    	$output .= get_the_title( $post->ID ); // Title of current page
    	$output .= '';
    	if( $options['tagline'] ) {
    		$output .= '

    '; $output .= stripslashes( $options['tagline'] ); $output .= '

    '; } return $output; }
    #1890
    mharpen
    Participant

    You are always so helpful. Thx J!! That will be a nice improvement to allow editing the layout on individual pages. Cool. I’m hopin we don’t need to purchase a new license for the next Alyeska update? (I just bought 4 more, and i’ve been sending customers your way.) 🙂

    #1900
    Jason Bobich
    Keymaster

    Nope, you won’t need to purchase anything new. Updates are always free for the life of the theme over on ThemeForest.

    #17503
    moriah@esd
    Member

    Has this feature been added to the theme now? For some reason I’m having trouble getting my custom layout to add the page title. http://kalamaschools.org/news/

    #17504
    Jason Bobich
    Keymaster

    Yes, it has been added. The way it works is you add the “Headline” element to your layout, and then use %page_title% within it.

    Note: You’re currently using the “Slogan” element at the top of your layout, which this will not work with.

    #17513
    moriah@esd
    Member

    Oh yes I see it now – than you so much!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The forum ‘Alyeska Responsive WordPress Theme’ is closed to new topics and replies.