Site logo

Archived topic

Header Height

10 replies · Started by Larry Cunningham on April 12, 2015

Viewing posts 1–11 of 11

Hi Tom

What is the easiest method of increasing the height of the header container?

Also can I get the header image to cover both the header container and the navigation.

Thanks

Larry

Tom

I've used Elemental spacing to adjust the height of the header and this seems to work.

I'd still be interested to know if there is an easy way to combine the background image of the header with that of the navigation.

Thanks

Larry

Hi Larry,

You can use a PHP function to move the navigation inside the header.

Is your header currently below or above the header?

Let me know :)

Thanks Tom. The navigation is below the header.

Larry

Give this PHP a try:

add_action('after_setup_theme','generate_move_navigation_inside_header');
function generate_move_navigation_inside_header()
{
      remove_action( 'generate_after_header', 'generate_add_navigation_after_header', 5 );
      add_action( 'generate_after_header_content', 'generate_add_navigation_after_header', 5 );
}

Here's how to add your own PHP: http://generatepress.com/knowledgebase/adding-php-functions/

Hi Tom

Have tried creating the plugin as the site is on Wordpress.org and get a fatal error!

This the message:

Parse error: syntax error, unexpected T_FUNCTION in /websites/123reg/LinuxPackage22/sa/ll/yg/sallygardinerceramics.co.uk/public_html/wp-content/plugins/navigation-in-header/navigation-in-header.php on line 13

and this is the script:
<?php
/*
Plugin Name: Navigation in header
Plugin URI:
Description:
Version:
Author:
Author URI:
License:
License URI:
*/
add_action('after_setup_theme','generate_move_navigation_inside_header');
function generate_move_navigation_inside_header()
{
remove_action( 'generate_after_header', 'generate_add_navigation_after_header', 5 );
add_action( 'generate_after_header_content', 'generate_add_navigation_after_header', 5 );
}

Any suggestions? I am new to adding php so it could easily be some very basic error on my part.

Thanks

Larry

Sorry for not getting back to you sooner!

I'm not spotting anything wrong..

Can you try pasting the content of the plugin to this site, and then linking me to the paste?: http://pastebin.com/

Let me know :)

Thanks Tom - that worked perfectly.

Larry

You're welcome :)

This archived topic is closed to new replies.