WordPress.org

Ready to get started?Download WordPress

Forums

hiding sidebar from home page and resizing the container (2 posts)

  1. eeee76
    Member
    Posted 5 years ago #

    i want the sidebar to be displayed in all pages except the home page.If i use the following code,the content of sidebar in home page is removed but the content of home page is not taking full width.The width which was set for sidebar is being left like that only.

    <?php if (!is_front_page()) {
    get_sidebar();
    } ?>

    Pls help.I want to use the whole width in home page .If i set sidebar right side it is working.For left side it is giving prblm

  2. esmi
    Forum Moderator
    Posted 5 years ago #

    You'd also need to use the same if statement to set a different class (or id) on the main content block so that you could then re-size it using CSS.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.