[resolved] How to Hide Sidebar on MULTIPLE PAGES then Extend Pages to take full width (2 posts)

  1. dra6on
    Posted 4 years ago #

    Hey All,

    Need some assistance with hiding the sidebar on more than 1 page and then taking up the full length of the page. I've worked out how to do it one page perfectly but doing it for the second doesnt seem to work. So I have done the following

    In the page.php file i have added the following to in the sidebar section

    <!--Begin Sidebar-->
    <?php if (is_page('20012','27391')) : ?>
    <?php else : ?>
    <?php get_sidebar(); ?>
    <?php endif; ?>
    <!--End Sidebar-->
    <!--Begin Footer-->

    this doesn't seem to work for the second page, if i swap the numbers around the other page works. I have also tried to use the array command, and also the && commend and neither of them work. see below :

    <?php if (is_page(aray(20012,27391))) : ?>


    <?php if (!is_page('20012') && !is_page('27391') ) : ?>


    To extend the and take the entire page of the theme the following command is used in the page.php file :

    <div id="left-div" <?php if(is_page('20012','27391')) echo 'class="widepage"'; ?>>

    once again it only works for the first page and not the second. dont know if this is the correct syntax for the second page to work but it only works for the first one.

    i have also added the following line into the styles.css page :

    #left-div.widepage { width: 950px; }

    i believe this is right and i dont think anything else needs to be done here but if there is please advise.


    Hope someone can assist with the problem im having on hiding the sidebar to the 2nd page.

  2. dra6on
    Posted 4 years ago #

    Anyone able to help?

Topic Closed

This topic has been closed to new replies.

About this Topic