Register or log in:



Hot Tags

Blog Oh! Blog Forums » General Discussion

Delete sidebar for certain pages

(3 posts)

  1. hivalb
    Member

    Hi there,

    I am using the blue box theme at www.commonwaters.net and I would like to delete the sidebar on my "links" page.

    From the Blue Box themes folder, I copied the page.php file and renamed it page_no_sidebar.php. In the latter I deleted <?php get_sidebar(); ?>.

    I then replaced that string in page.php with the following:

    <?php if (is_page('links') ):
     // we're in the links page, and using a modified template ?>
     <?php include ('page_no_sidebar.php'); ?>>
    <?php } elseif (is_page() ):
     // we're using the default template ?>
     <?php include ('sidebar.php'); ?>>
    <?php endif; // end the if, no templates for other pages ?>

    Where have I gone wrong? I am a newbie so thank you for your help!

    Valerie

    Posted 3 months ago #
  2. Hi,

    You are missing some parts in the code, Try this instead :-

    <?php if (is_page('links') ):
     // we're in the links page, and using a modified template ?>
     <?php include (TEMPLATEPATH .'page_no_sidebar.php'); ?>
    <?php } elseif (is_page() ):
     // we're using the default template ?>
     <?php include (TEMPLATEPATH .'sidebar.php'); ?>
    <?php endif; // end the if, no templates for other pages ?>
    
    Posted 3 months ago #
  3. hivalb
    Member

    Thanks Jai!

    The support on this site is quite refreshing as the wordpress forum is full of silly bickering!

    Thanks again for your help!!!

    Val

    Posted 3 months ago #

RSS feed for this topic

Reply

You must log in to post.

{ A Forum of Blog Oh! Blog }