Support » Fixing WordPress » Need help in creating another sidebar for a seperate template

  • Ok I am using the custome page template and I want to call in

    the header
    the sider bar 2

    and the footer

    I have made the sidebar2, put it in the folder with the other php files in my wordpress template but when I call the sidebar 2 it doesn’t show up. What am I doing wrong, what do I have to do. This is just for a custom template so certain pages show a different sidebar then the usual one. THanks.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Need to understand what template will be used by WordPress to display your pages so see Template Hierarchy. Also review Pages and the section there on Page Templates.

    You could also put code in a Page Template that uses a different sidebar based on the page id–for example:

    if (is_page('2) || is_page('7') ) {
    get_sidebar('mysidebar'); // will include sidebar-mysidebar.php

    Stepping Into Template Tags
    Stepping Into Templates

    hey there thanks but for the life of me I cannot figure this out an no way can it be this complicated.

    Where do I put that if statement say, in my main index php file where I am just calling in the header, sidebar and footer.

    Oh and how do you go about naming your sidebar-mysidebar.php to just mysidebar

    Ah–you need to read some of those links I provided…

    FTP client can be used to rename files on your host or your hosts file manager.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Need help in creating another sidebar for a seperate template’ is closed to new replies.