Support » Themes and Templates » Alternate between left and right sidebar in twenty eleven

  • Hi there all of you!

    I am quite new to wordpress but have basic knowledge in html, php and some programming languages.

    I am currently working on a child theme to twenty eleven where I would like to create two custom page templates to have the option of putting the sidebar either on the right side or the left side of the page.

    There is a built in feature in twenty eleven where you can set the default sidebar location as either right or left. The problem is that I would like to have the sidebar to the right side onsome pages and to the left on others.

    I suppose that creating two custom page templates is the easiest way of doing this? I have no idea on where to begin though! Is there anyone having a smart fix for this out there so please share it!

Viewing 5 replies - 1 through 5 (of 5 total)
  • Michael


    Forum Moderator

    here is an idea to create new page templates to be able to set the sidebar orientation for static pages in a child theme of Twenty Eleven.

    Thank you for the suggestion but I have actually already tried that guide and somehow it crashes my page after I upload the new functions.php. I cannot even access the admin panel when this happens and I have to access the database via php myadmin and reset the theme to standard twentyeleven. Maybe there is a fix to the crash problem though, I will try to upload the error code.



    Forum Moderator

    if you have a totally new functions.php in your child theme, you need to start that file with <?php in the first line.

    feel free to paste the full code of functions.php into a and post the link to it here.

    Ah I see, im quite sure that must be the problem! Beacuse I tried to simply upload an altered functions.php file to my child theme folder where I had copied the code of the original functions.php and then added your code (saw now that you were the author of that guide?).

    But from what I just read when doing some research this will make the webpage try to load both the functions.php in the parent theme folder and the functions.php in the child theme folder which causes the crash?

    I will try your suggestion as soon as I get home!

    Problem fixed! It was a misunderstanding from my part about how to use a new functions.php in the child theme folder that led to the crash. You should always start out with a blank functions.php in the child theme folder, not copy the functions.php file from the parent theme folder.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Alternate between left and right sidebar in twenty eleven’ is closed to new replies.