Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Back End Adding second sidebar to customized theme woes.

  • This topic is empty.
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #28492
    ncomelab
    Member

    Hi all,
    New to Worpdress coding and new to this board (*waves hello*), with the help of Chris’s screencasts I have somewhat managed to put together my very first customized wordpress theme. The theme is far from finished however all was well until I tried to add a second sidebar to the left of my theme.

    Here is the code I used:

    functions.php

    Code:

  • ‘,
    ‘after_widget’ => ‘
  • ‘,
    ‘before_title’ => ‘

    ‘,
    ‘after_title’ => ‘

    ‘,
    ));
    }

    ?>

I created two sidebar files: sidebar.php

Code:

and sidebar2.php

Code:

    We noticed you are not using a dynamic sidebar. Please update to the latest version of WordPress.

Both sidebars are called in the index.php

Code:

“>

post divider

posted by on

I am not sure what you are looking for.

And this is the result: http://ceci-et-cela.com/blogsite/ whereas my goal is for it to look like this:
[img]http://www.ceci-et-cela.com/cc/images/screenshot.jpg[/img] where the left sidebar displays the categories.

I think it is a CSS problem however, being new to this, I cannot figure it out. I would greatly appreciate some pointers in the right direction. *smiles sweetly*

Please let me know if I need to supply more information!

Thank you very much for your time.

Nancy

#72832
davidandre
Member

Hi Nancy,

i think you should use an include to call the second sidebar instead of "get sidebar".It should works in this way.Always works for me like that. Then you can use css and put it where you want!
hope it helps.,
bye
David

#72896
ncomelab
Member

Thank you, I appreciate your help! I will try it with the include and see how it goes.

Cheers!
Nancy

#72935
ncomelab
Member

OK – surely I must be missing something…

When I use the include command

Code:

I get the following error code:

Warning: include(?sidebar2php?) [function.include]: failed to open stream: No such file or directory in /home/onl143/public_html/blogsite/wp-content/themes/cc/index.php on line 5

Warning: include(?sidebar2php?) [function.include]: failed to open stream: No such file or directory in /home/onl143/public_html/blogsite/wp-content/themes/cc/index.php on line 5

Warning: include() [function.include]: Failed opening ‘?sidebar2php?’ for inclusion (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/onl143/public_html/blogsite/wp-content/themes/cc/index.php on line 5

Sidebar2.php exists and is saved in the same directory. Any ideas what I am doing wrong?

Thanks so much!
Nancy

Viewing 4 posts - 1 through 4 (of 4 total)