[Resolved] Header Height

Home Forums Support [Resolved] Header Height

Home Forums Support Header Height

  • This topic has 10 replies, 2 voices, and was last updated 9 years ago by Tom.
Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #97919
    Larry Cunningham

    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

    #97924
    Larry Cunningham

    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

    #97939
    Tom
    Lead Developer
    Lead Developer

    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 πŸ™‚

    #97979
    Larry Cunningham

    Thanks Tom. The navigation is below the header.

    Larry

    #98127
    Tom
    Lead Developer
    Lead Developer

    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/

    #98811
    Larry Cunningham

    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

    #98914
    Tom
    Lead Developer
    Lead Developer

    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 πŸ™‚

    #98926
    Larry Cunningham

    Tom

    Here’s the link:

    http://pastebin.com/0TEBkiHr

    Thank you

    Larry

    #99097
    Tom
    Lead Developer
    Lead Developer

    Yea, what I thought – the apostrophes were converted into HTML strings.

    Try this: http://pastebin.com/MepTNsNf

    #99230
    Larry Cunningham

    Thanks Tom – that worked perfectly.

    Larry

    #99311
    Tom
    Lead Developer
    Lead Developer

    You’re welcome πŸ™‚

Viewing 11 posts - 1 through 11 (of 11 total)
  • You must be logged in to reply to this topic.