Remove Subnav from Focus Landing page

Community Forums Forums Design Tips and Tricks Remove Subnav from Focus Landing page

This topic is: not resolved

This topic contains 2 replies, has 2 voices, and was last updated by  tmstudiouser 1 year, 8 months ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #30292

    tmstudiouser
    Participant
    Post count: 16

    http://www.lovequotes.com/facebook-submit/

    I need to remove the subnav from this landing page. The code looks as though it should work, but for some reason it’s not. Any ideas? Thanks!

    <?php
    /**
    * This file adds the Landing template to the Focus Child Theme.
    *
    * @author StudioPress
    * @package Generate
    * @subpackage Customizations
    */

    /*
    Template Name: Landing
    */

    // Add custom body class to the head
    add_filter( ‘body_class’, ‘focus_add_body_class’ );
    function focus_add_body_class( $classes ) {
    $classes[] = ‘focus-landing';
    return $classes;
    }

    // Remove header, navigation, breadcrumbs, footer widgets, footer
    add_filter( ‘genesis_pre_get_option_site_layout’, ‘__genesis_return_full_width_content’ );
    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 );
    remove_action( ‘genesis_before_header’, ‘genesis_do_nav’ );
    remove_action( ‘genesis_after_header’, ‘genesis_do_subnav’, 15 );
    remove_action( ‘genesis_after_header’, ‘genesis_do_breadcrumbs’);
    remove_action( ‘genesis_before_footer’, ‘genesis_footer_widget_areas’ );
    remove_action( ‘genesis_footer’, ‘genesis_footer_markup_open’, 5 );
    remove_action( ‘genesis_footer’, ‘genesis_do_footer’ );
    remove_action( ‘genesis_footer’, ‘genesis_footer_markup_close’, 15 );

    genesis();

    #30318

    Brian Bourn
    Participant
    Post count: 98

    Unless you have changed the default code in you theme, it’s probably due to this:

    [php]remove_action( ‘genesis_after_header’, ‘genesis_do_subnav’, 15 );[/php]

    It should just be:

    [php]remove_action( ‘genesis_after_header’, ‘genesis_do_subnav’ );[/php]


    Bourn Creative | bourncreative.com | Twitter

    #34417

    tmstudiouser
    Participant
    Post count: 16

    Not sure why the 15 is there, but just removing it gave me an error.

    I studied the functions.php file and realized that it should be ‘genesis_before_header’.

    Changed that, still didn’t work until I removed the , 15.

    So a combination of these 2 helped me remove the sub nav from the landing page on 2 separate sites using the focus and balance themes.

    Here’s the working code now.
    // Remove header, navigation, breadcrumbs, footer widgets, footer
    add_filter( ‘genesis_pre_get_option_site_layout’, ‘__genesis_return_full_width_content’ );
    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 );
    remove_action( ‘genesis_after_header’, ‘genesis_do_nav’ );
    remove_action( ‘genesis_before_header’, ‘genesis_do_subnav’ );
    remove_action( ‘genesis_after_header’, ‘genesis_do_breadcrumbs’ );
    remove_action( ‘genesis_before_footer’, ‘genesis_footer_widget_areas’ );
    remove_action( ‘genesis_footer’, ‘genesis_footer_markup_open’, 5 );
    remove_action( ‘genesis_footer’, ‘genesis_do_footer’ );
    remove_action( ‘genesis_footer’, ‘genesis_footer_markup_close’, 15 );

    genesis();

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

You must be logged in to reply to this topic.