• Resolved dra6on

    (@dra6on)


    Hey Guys

    I’m need some assistance one a two step process. I’ve figure out how to hide the side bar on specific pages. But once I do that the page that doesn’t take up the entire length of the theme. The sidebar widgets are gone but the page stays at its normal width, I would like to extend it to take full advantage of the theme.

    To hide the sidebar I added this into the pages.php

    <?php if (is_page(‘200’)) : ?>
    <?php else : ?>
    <?php get_sidebar(); ?>
    <?php endif; ?>

    Now my question is, I how do we extend page no#200 to take the full length of the screen/theme. I have read that you need to do something along the lines of this :

    <div class=”myclass”>

    <div class=”<?php if (!is_page(‘x’)) : ?>myclass<?php else : ?>myclasswider<?php endif; ?>”>

    and

    .myclass {
    width:800px
    }
    .myclasswider {
    width:1000px
    }

    But where does this go ??? in the pages.php file ? or somewhere else. Or is the code just mention above wrong. If someone can point me in the right direction on how to extend the page once i’ve removed the sidebar that would be greatly appreciated.

    if you need example code from the site please let me know as it might make things easier.

Viewing 5 replies - 31 through 35 (of 35 total)
  • try to add this to style.css:

    .widepage #left-inside .single-entry-titles, .widepage #left-inside .post-wrapper { background:none; width:900px; margin-top:-30px;}

    please try to work with a web tool such as Firebug for further css/formatting problems.

    detailed css help is not the primary focus of the wordpress forum.

    Thread Starter dra6on

    (@dra6on)

    @alchymyth YOU ARE A DEAD SET LEGEND !! 🙂 hahaha

    Thanks mate you’ve solved all my issues and its perfect exactly how i want it… if i introduce more pages down the line i can use the array comment which we already have set into place and then add the page id and it will inherit all that’s needed which is the removal of the background image and banner.

    Thank you once again for all your help. i owe you one 😉

    you are welcome 😉

    as a last effort, please mark this topic as resolved – thanks.

    Thread Starter dra6on

    (@dra6on)

    done 😉 would it be possible to speak to via email ?

    bryceadams

    (@bryceadams123)

    dra6on, even though you’ve resolved this, i 100% agree with pankaj.

    making a template page is very very easy. the simplest way to explain it to you would be to duplicate/copy your current page.php file and rename it as *anything*.php. then add:

    <?php
    /*
    Template Name: No-Sidebar Page Template
    */
    ?>

    at the top and then just remove <?php get_sidebar () ?> from the bottom of that file or wherever it is.

    now on that individual page in wordpress, just select that template from the list on the right sidebar.

    however, you may have an issue now with the content width being set to a smaller amount than the container as it still thinks there’s a sidebar there. then I would just find ‘content’ or whatever the id/class for your main content area is called, copy the ids/classes associated with it (probably just a few), and then change the width to your full page width (whatever it may be).

    sorry if that sounded complicated.. i know with the last few lines of adding id/classes there are easier/nicer ways to do it but that’s just what i personally do.

    this is a very easy quick fix and allows you to use it again on another page.

Viewing 5 replies - 31 through 35 (of 35 total)
  • The topic ‘How to Hide Sidebar then Extend Page to take full width’ is closed to new replies.