• I want to keep the sidebar on main page but remove it from everywhere else, and in addition, make the width for these other pages the full width. I’m using a custom theme, MistyLook 3.6.1, but the author says it’s too complicated as it will require changing multiple files.

    Anyone got a clue?

Viewing 4 replies - 1 through 4 (of 4 total)
  • You can make different sidebars, but your request requires removing the get-sidebar argument from all php files instead of the index.php and in order to use the space that comes free, you’ll need to edit the style.css thus that you have a part for the index and a part for the rest. Undoubtly this is possible, but I’m not the person to help you with coding.

    Thread Starter toobroketofix

    (@toobroketofix)

    Thanks Gangleri,

    This points me in the right, albeit hair-tearing, direction.

    You could simply create a home.php template file. This is the file wordpress searches for first, as explained in the codex. Simply code a sidebar in home.php, and then manually delete the sidebar in all other templates (page.php, index.php, tag.php, etc…) and then style it to your liking.

    Hope this helps.

    To make your side bar disappear on a single post edit your sidebar code like so:

    At the very top of your sidebar file paste:

    <?php if(is_single()){}else{ ?> (that should be the first line of code)

    At the very end of your sidebar file paste:

    <?php } ?>
    (that should be the last line of code)
    That should make your sidebar disappear when viewing a single post.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Remove sidebar everywhere but home page’ is closed to new replies.