January 14, 2015 at 12:14 am #3554
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?January 14, 2015 at 12:40 am #3555
Ok – I think I see the answer to my question under the ‘Settings’ tab in the Layout Manager.
Layoutdo_action(‘output_layout’,’end’);January 14, 2015 at 12:42 am #3556
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.
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.January 14, 2015 at 12:45 am #3557
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:
It will print an array and some other details in the page for quick reference.January 14, 2015 at 12:54 am #3558
Thanks Andy, this information is helpful.January 14, 2015 at 12:56 am #3559
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.
You must be logged in to reply to this topic.