Headers and Footers – Runway vs WordPress

Home Page – v1.1 Forums Extensions Layout Manager Headers and Footers – Runway vs WordPress

This topic contains 5 replies, has 2 voices, and was last updated by  Andy Wilkerson 4 years, 8 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #3554

    Eric Sopp
    Participant

    Do Runway Header and Footer Layout Sections interact with WordPress wp_head and wp_footer hooks? Or are they additional block areas that are added above/below the post body (Default Content) in the Post Loop?

    #3555

    Eric Sopp
    Participant

    Ok – I think I see the answer to my question under the ‘Settings’ tab in the Layout Manager.

    Layoutdo_action(‘output_layout’,’start’);
    Layoutdo_action(‘output_layout’,’end’);

    #3556

    Andy Wilkerson
    Keymaster

    The layouts, the columns and rows you create, these are inserted using the action hooks referenced in the admin. You’ll want to add those into your header.php and footer.php as referenced. Depending only your design structure you can choose the best point to have the code.

    do_action('output_layout','start');

    do_action('output_layout','end');

    The header and footer options are not automatically inserted. These are best thought of as placeholders for custom theme options which the Layout Manager will provide the appropriate values based on the selected header/footer and layout combination. What these let you do is pull the values of the options for your header/footer and apply the design styles as needed to your theme.

    That might be a bit confusing and I’ve never known exactly how to describe it. Basically, in your header.php you would have a function call to get the header options, such as:

    // Header Data
    //................................................................
    $header_data = get_layout_options('header');
    $header = (isset($header_data)) ? $header_data : false;
    

    This will return the full array of header options for the currently loaded post. It will figure out if you have a custom header assigned to the page or fall back to a default based on a post type setting. If not set it defaults to your main layout. It does the work of determining the page and getting the values for the correct header/footer/layout combination.

    Once you have the values returned, you can conditionally change the output of your header/footer content and design. We wanted to keep this open in structure so a design of any type could use the settings the way they needed.

    #3557

    Andy Wilkerson
    Keymaster

    Also, here’s a helpful diagnostic tool built into Runway. You can see the value of a variable quickly with the out() function. So if you got the header data from the function referenced above, you could see the content of that with:

    out($header_data); or out($header);

    It will print an array and some other details in the page for quick reference.

    #3558

    Eric Sopp
    Participant

    Thanks Andy, this information is helpful.

    #3559

    Andy Wilkerson
    Keymaster

    Absolutely. A lot of this is fresh in my mind. We’ve been working on the Layout Manager documentation a little last week and hoping to finish this week (maybe tomorrow, if tonight goes well!) so I’m happy it’s helpful.

    All this is in the upcoming document and more. I’m looking forward to getting it published.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.

Fork us on Github.

Runway on Github

Learn with User Guides.

View the Guides


Thank you for being a part of Runway. We hope you have a great experience and together we can make Runway one of the best additions to the WordPress ecosystem and theme development. We're excited to have you here!

escort kutahya escort bornova escort beylikduzu escort amasya escort diyarbakir
Google+ ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?> ?>