• Resolved danishfareed

    (@danishfareed)


    My question is: how to avoid <div class=”container”> while creating custom page template?

    get_header();
    do_action( 'greenlet_before_main_container' );

    I’m using above code to add header & footer but this comes with a default:

    <section class="site-content" id="content"><div class="container"><div class="row">
    </div></div></section>

    Whatever I’m adding in custom templates it’s under this div tag, so I’m unable to make the width:100%

    Can you please tell me a way where I can able to add header & footer without this default site-content section? or a way to avoid it in particular page/template only.

    Thank you in advance.

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Theme Author Greenlet Team

    (@greenlet)

    Hi @danishfareed
    get_header(); renders header.php. So, if you look at header.php in greenlet root directory the code includes greenlet_markup( 'site-content', greenlet_attr( 'site-content' ) ); which is responsible for the site-content section.

    You can override header.php in your child theme and replace this section (or any other part of header like container). You can also add condition for the same, something like:

    if( $condition ) {
        greenlet_markup( 'site-content', greenlet_attr( 'site-content' ) );
    }

    Note: if you remove a section created under header.php, also don’t forget to remove the closing tag under footer.php. Eg: If you remove one opening tag from header, change greenlet_markup_close( 3 ); to greenlet_markup_close( 2 ); in footer.

    Hope that helps.

Viewing 1 replies (of 1 total)
  • The topic ‘How to make fullwidth page?’ is closed to new replies.