WordPress.org

Ready to get started?Download WordPress

Forums

can't remove sidebar for static pages (7 posts)

  1. kalinga59
    Member
    Posted 4 years ago #

    I want to set up some static pages without the sidebar and using the full column width. How can I do this using the Librio theme?

    (I have tried the standard changes but without success. Removing the "get_sidebar" call in "page.php" gets rid of the sidebar text and widgets but its broad coloured stripe remains. Also, setting class="widecolumn" in the "div" tag does not change the page width.)

  2. binni_77
    Member
    Posted 4 years ago #

    Try specifying width to content.page,post classes like width:980px;

  3. kalinga59
    Member
    Posted 4 years ago #

    Sorry, I don't anderstand. I'm editing the page template file:
    wp-content/themes/librio/page.php
    Which bits of code in there shoud I change and how?

  4. krembo99
    Member
    Posted 4 years ago #

    could you please post the URL ?

  5. kalinga59
    Member
    Posted 4 years ago #

  6. s_ha_dum
    Member
    Posted 4 years ago #

    You say that you want to set up some static pages without the sidebar, so I am assuming that some pages will still have the sidebar. Here is what I'd do:

    1) Copy page.php to full_content.php
    2) Add

    /*
    Template Name: FullContent
    */

    to the top of the new page right after the <?php
    3) Remove the sidebar including the whole div id="sidebar"
    4) Add a class to div id="content" so that you have

    <div id="content" class="full_content_width">

    5) Add

    div.full_content_width { width:100% }

    to your style.php
    6) Add your pages using the WP Pages->Add New panel selecting your new template as the template for the page-- over on the right under 'Template'.

    Hopefully that will work. It should at least get you close.

    You could add a switch to you existing page.php and avoid creating a new template file, but this way makes it easy to choose sidebar vs no-sidebar as you go along.

  7. kalinga59
    Member
    Posted 4 years ago #

    There is no style.php file. There is a style.css file but I cant see where the line div.full_content_width { width:100% } would fit in.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags