theme change

I'd like to modify code to have the option of sidebar or no sidebar on individual blog posts. I found the code to do so in a wordpress book which, if it works as advertised, gives you a check box for sidebar or no sidebar on each blog post. Has anyone had experience with this? It involves changing the single.php and the loop.php file. I'd like to know if there are any unstated pitfalls in trying this. Will have multiple backups before attempting.

  • Tom Eagles
    • Syntax Hero

    @davidcpa the best advice i can give you is test it on a dummy site don't use a live one, try all your experiments there. Different themes handle changes in different ways so it will be a bit of trial and error. I suggest when starting to modify things use twenty-eleven as a learning theme as its very easy to change.

    If you get stuck give us a shout someone should be able to help.

  • teckyhead
    • Design Lord, Child of Thor

    There is one possible pitfall in doing this - though as long as you know and prepare for it you should be fine. If the theme you are using has any updates then your changes may get overwritten. It will depend on whether there are changes in the loop.php and single.php files.

    From a security point of view, not updating isn't a good option, so each time there is a theme update you would need to check whether it has affected your sidebar mod and, if so, you will need to make those changes again.

    For running Wordpress on your PC you will need the Apache/PHP/MySQL environment. You can do that with either of these:


    I use Wampserver these days but have used Xampp in the past - both are good options.


  • Tom Eagles
    • Syntax Hero

    Hiya, just going through some of the older threads here.

    As it's been a little while since we last heard from you I thought I'd check in to see how you're going?

    If you're still looking for some further assistance with this thread then please feel free to reopen the thread or of course for any new and related issues you are most welcome to open a new thread.


Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.