Community Forums › Forums › Archived Forums › General Discussion › Removing Site-inner but div end tag still up?
Tagged: .site-inner, structural wrap
- This topic has 3 replies, 2 voices, and was last updated 9 years, 9 months ago by
Victor Font.
-
AuthorPosts
-
July 5, 2015 at 11:06 am #158417
webmestre-cgmatane
MemberHello,
i'm having a problem with my genesis website.
On my homepage and some other pages, im trying to remove the site-inner wrap with :
// Remove theme support de function.php remove_theme_support ('genesis-structural-wraps', 1 ); // Modifier Structural Wrap selon la page ou front-page add_action('genesis_meta', 'setting_site_structural_wrap'); function setting_site_structural_wrap() { if( is_front_page() || is_page_template('templates/programmes.php') ) { $default_arr = array( 'header', 'nav', 'subnav', 'footer-widgets' ); } else { $default_arr = array( 'header', 'nav', 'subnav', 'inner', 'footer-widget' ); } add_theme_support('genesis-structural-wraps', $default_arr); }
But when im scanning my code i see a un wanted </div> just before my site-footer... is my structural_wrap function remove the opening site-inner div and the closing one... how can i remove this div ?
here my simplified code (with matching tags closed) :
<!DOCTYPE html> <html lang="fr-FR"> <head></head> <!-- PAGE BODY --> <body class="home page page-id-1688 page-template page-template-templates page-template-front-page page-template-templatesfront-page-php full-width-content" itemscope="itemscope" itemtype="http://schema.org/WebPage"> <a href="#0" class="to-top" title="Back To Top"><i class="fa fa-chevron-up"></i></a><!-- Go to Top --> <div class="site-container"> <header class="site-header" role="banner" itemscope="itemscope" itemtype="http://schema.org/WPHeader"></header> <nav class="nav-primary" role="navigation" itemscope="itemscope" itemtype="http://schema.org/SiteNavigationElement"></nav> <div class="slider-zone"></div> <!-- END Slider-zone --> <div class="content-sidebar-wrap"> <main class="content" role="main" itemprop="mainContentOfPage"> <div id="home-salledepresse"></div> <!-- [Fin] #home-salledepresse --> <div id="home-programmes"></div> <!-- [FIN] #home-programmes --> <div id="home-social"></div> <!-- [FIN] .home-social --> </main> </div><!-- [FIN] content-sidebar-wrap --> <!-- ******************* ************** --> </div> <!-- ************ UNWANTED TAG ** Site-inner? ************** --> <!-- ******************* ************** --> <footer class="site-footer" role="contentinfo" itemscope="itemscope" itemtype="http://schema.org/WPFooter"></footer> </div> <!-- <FIN] site-container --> </body> </html>
Thx if some1 can help me, i really need this help.
July 5, 2015 at 8:18 pm #158453Victor Font
ModeratorWhy are you setting up structural wraps using the genesis_meta action. Genesis_meta is used for setting up meta tags.
This is all I would have done:
add_theme_support('genesis-structural-wraps', 'setting_site_structural_wrap'); function setting_site_structural_wrap() { if( is_front_page() || is_page_template('templates/programmes.php') ) { $default_arr = array( 'header', 'nav', 'subnav', 'footer-widgets' ); } else { $default_arr = array( 'header', 'nav', 'subnav', 'inner', 'footer-widget' ); } return $default_arr; }
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?July 6, 2015 at 7:18 am #158491webmestre-cgmatane
Memberthx for your help but
When im using genesis-structural-wraps ... a <div class="wrap"> is insered in my <footer></footer> tag
is there a way that i can remove this wrap to have my footer full-width like :
my child footer.php
do_action( 'genesis_before_footer' ); do_action( 'genesis_footer' ); do_action( 'genesis_after_footer' ); echo '</div><!--END site-container-->'; //* end .site-container or #wrap do_action( 'genesis_after' ); wp_footer(); //* we need this for plugins ?> </body> </html>
my custom-function.php
// Remove theme support de function.php remove_theme_support ('genesis-structural-wraps', 1 ); // Modifier Structural Wrap selon la page ou front-page add_action('genesis-structural-wraps', 'setting_site_structural_wrap'); function setting_site_structural_wrap() { $body_classes = get_body_class(); if ( is_front_page() || is_page() || is_page_template('templates/programmes.php') || is_page_template('templates/default-page.php') || is_page_template('fullwidth-page.php') || is_404() || is_single() ) { $default_arr = array( 'header', 'nav', 'subnav'); } if ( is_page('blog') || $class = 'event-list') { $default_arr = array( 'header', 'nav', 'subnav', 'inner', 'footer' ); } else { $default_arr = array( 'header', 'nav', 'subnav', 'inner', 'footer' ); } add_theme_support('genesis-structural-wraps', $default_arr); }
July 8, 2015 at 7:30 pm #158859Victor Font
ModeratorYou don't have to remove the wrap. Change its width with css.
.footer .wrap { min-width: 100%; }
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet? -
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.