Remove Footer Scripts From Page Template

Community Forums Forums Design Tips and Tricks Remove Footer Scripts From Page Template

This topic is: not resolved

Tagged: 

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

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

    Bryan
    Participant
    Post count: 8

    Hi,

    I’m trying to make an unbranded page on my custom Genesis template but seem to be stuck on removing some of the footer scripts that are entered in the admin area settings. We have a livechat widget that is still showing. Here’s the page: http://virtualstagingsolutions.com/unbranded-furniture/

    I’m trying to either just get rid of the livechat code snippet within the wp_footer output or the whole thing that Genesis injects.

    I basically just created a custom page template with this code:

    <code>

    <?php
    /*
    Template Name: Unbranded
    */

    // Add custom body class to the head
    add_filter( ‘body_class’, ‘add_body_class’ );
    function add_body_class( $classes ) {
    $classes[] = ‘unbranded’;
    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_after_header’, ‘genesis_do_nav’ );
    remove_action( ‘genesis_after_header’, ‘genesis_do_subnav’ );
    remove_action( ‘genesis_before_loop’, ‘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();
    ?>

    </code>

    I also can’t seem to edit the #inner css class with this code. Only the body class.

    Any ideas?

    Thanks!

    • This topic was modified 1 year, 3 months ago by  Bryan.
    • This topic was modified 1 year, 3 months ago by  Bryan.
    • This topic was modified 1 year, 3 months ago by  Bryan.
    • This topic was modified 1 year, 3 months ago by  Bryan.
    http://virtualstagingsolutions.com/unbranded-furniture/
    #42269

    braddalton
    Participant
    Post count: 9735

    Use a conditional tag [php]!is_page_template(‘custom’)[/php] to exclude the output of your script on all pages using your custom page template


    Specializing In StudioPress Child Theme Customization.
    500+ StudioPress Tutorials

    #42343

    Bryan
    Participant
    Post count: 8

    Thanks, where would I place that? Child theme functions file?  And is there a function or something that would say not to include the genesis footer scripts?

    I’ve got this in the page template now:

    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 );

    but that only removes the appearance of the footer not the scripts that are embedded in the theme settings.

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

You must be logged in to reply to this topic.