Generate Theme: Remove Header

Community Forums Forums Design Tips and Tricks Generate Theme: Remove Header

This topic is: not resolved

This topic contains 5 replies, has 2 voices, and was last updated by  SoZo 1 year, 10 months ago.

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

    ironjiant
    Participant
    Post count: 43

    I am looking to remove the Header of the Generate Theme. The code below removes the header but screws up the sidebar and footer box.

    http://www.jayniblick.com

    And added this code within functions.php:

    /** Remove header */
    add_action(‘get_header’, ‘child_remove_header’);
    function child_remove_header() {
    if ( ! is_home() )
    remove_action( ‘genesis_header’, ‘genesis_header_markup_open’, 5 );
    remove_action( ‘genesis_header’, ‘genesis_do_header’ );
    remove_action( ‘genesis_header’, ‘genesis_header_markup_close’, 15 );
    }

    Thanks,

    -Jim

    #14677

    SoZo
    Moderator
    Post count: 1573

    Did you write that out or copy/paste it from somewhere? It is showing up here with fancy single quotes. Try copy pasting this
    [php]/** Remove header */
    add_action(‘get_header’, ‘child_remove_header’);
    function child_remove_header() {
    if ( ! is_home() )
    remove_action( ‘genesis_header’, ‘genesis_header_markup_open’, 5 );
    remove_action( ‘genesis_header’, ‘genesis_do_header’ );
    remove_action( ‘genesis_header’, ‘genesis_header_markup_close’, 15 );
    }[/php]


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

    #14682

    ironjiant
    Participant
    Post count: 43

    Thanks for noticing that SoZo,
    It works as before but the sidebar and Footer boxes are still off.

    -Jim

    #14684

    SoZo
    Moderator
    Post count: 1573

    Ok, try this with the extra curly braces
    [php]/** Remove header */
    add_action(‘get_header’, ‘child_remove_header’);
    function child_remove_header() {
    if ( ! is_home() ) {
    remove_action( ‘genesis_header’, ‘genesis_header_markup_open’, 5 );
    remove_action( ‘genesis_header’, ‘genesis_do_header’ );
    remove_action( ‘genesis_header’, ‘genesis_header_markup_close’, 15 );
    }}[/php]


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

    #14686

    ironjiant
    Participant
    Post count: 43

    Resolved. You can close this Post.

    Thanks!

    -Jim

    #14691

    SoZo
    Moderator
    Post count: 1573

    You’re welcome :)


    John “Nicolas Flamel” Wright | SoZo’s design| John Wright Photography

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

The topic ‘Generate Theme: Remove Header’ is closed to new replies.