Forums

[resolved] 2 sidebar template to 1 sidebar (15 posts)

  1. oliviaok
    Member
    Posted 4 months ago #

    Hi,

    On my theme I currently have 2 sidebars, one on left for side menu and one on right for widgets.

    I am happy to keep this formation for the most of the site, however for 11 pages I would like to keep to the left sidebar(side menu) and remove the right sidebar(widgets).

    Can I get some direction on how to do this, or perhaps if there is some codex I could read.

    Best,

    Oliviaok

  2. esmi
    Theme Diva & Forum Moderator
    Posted 4 months ago #

    Try creating a custom page template.

  3. oliviaok
    Member
    Posted 4 months ago #

    Thanks Esmi,

    I just noticed I have a default template(currently in use) and 2nd template( with both sidebars removed).

    I will use the 2nd template to edit and play and add the left sidebar.

    Where can I find the code for just a left sidebar to insert in the template?

    Best

  4. oliviaok
    Member
    Posted 4 months ago #

    http://pastebin.com/qznmrq9q

    this is the 2nd template id like to add the left sidebar if someone can help?

    thanks

  5. oliviaok
    Member
    Posted 4 months ago #

    my site is http://www.calligraphycompany.com

    can anyone help out on this?

  6. esmi
    Theme Diva & Forum Moderator
    Posted 4 months ago #

    Try creating a custom page template.

  7. oliviaok
    Member
    Posted 4 months ago #

    hi esmi,

    ive created a custom page template called onesidebar.php

    what code must i add to the template for just the left sidebar to appear?

    thanks

  8. esmi
    Theme Diva & Forum Moderator
    Posted 4 months ago #

    What code is being used to call the left sidebar in the default page template?

  9. oliviaok
    Member
    Posted 4 months ago #

    i believe this is:

    <?php get_sidebar(); ?>

    found in index.php

  10. esmi
    Theme Diva & Forum Moderator
    Posted 4 months ago #

    Then try adding that to your custom page template.

  11. oliviaok
    Member
    Posted 4 months ago #

    Hi Esmi

    this code :<?php get_sidebar(); ?>
    gives both left and right sidebar,

    so I went to sidebar.php file and copied code for sidebar 1 only, and pasted this within my new template.

    I also pasted all the code from the original main template and removed
    <?php get_sidebar(); ?>

    Now it gives me only the left sidebar as desired.

    My only concern now is it hasn't copied some of the styling, as some colours are wrong and it also has the admin details and comments box?

  12. oliviaok
    Member
    Posted 4 months ago #

    this is the page i used the template on:

    http://www.calligraphycompany.com/handwritten-invitations

  13. oliviaok
    Member
    Posted 4 months ago #

    hi esmi,

    this is the sidebar1 code i inserted:

    http://pastebin.com/e6QSB2j7

    is there something in here that makes my styling different to my normal template?

    thanks for your help so far

  14. esmi
    Theme Diva & Forum Moderator
    Posted 4 months ago #

    You would have been better off placing the code for the left-sidebar in a new file called sidebar-left.php and then using <?php get_sidebar('left');?> in your custom page template.

    My only concern now is it hasn't copied some of the styling, as some colours are wrong

    Try using Firefox with the Firebug add-on for this kind of CSS work.
    http://getfirebug.com/

    and it also has the admin details and comments box?

    Then you need to edit the copied code some more.

  15. oliviaok
    Member
    Posted 4 months ago #

    thanks esmi for your help.

    i will try resolve the styling issues now.

Reply

You must log in to post.

About this Topic