Kubric, displaying the sidebar
"<?php get_sidebar() ?>"into the bottom of your single.php or page.php, but before
get_footer(). This assumes, the sidebar should be on the right side, while content remains left.
Then you’ll probably have to amend the widths of whatever divs are used to hold the content in pages and posts, and let them float (if that’s not the case yet). Any further assistance would require at least a link to your homepage ;).
Thanks for the reply. I’ll give this a try. Here’s the URL to my site:
I have to admit defeat as I’ve been trying for hours to get the sidebar to appear on all pages, but I’m struggling.
I followed your advice Sivar and I’m stuck on the divs, but even though I have the sidebar on most pages, it’s not the same sidebar as my home page.
How can I get the sidebar on my homepage to repeat on every other page like Soggybag’s site?
Your advice would be much appreciated and don’t worry, there’s no content on there yet.
I managed to figure it out, woohoo!
Firstly, I never realised that you could add your own items to your sidebar within the admin control panel, which overrides the template version, and secondly……
after searching various posts on this forum, I found an article referencing template heirarchy and after trying to get my head around this, I renamed the single.php file to something else, and it works although it doesn’t have a grey background like the other pages, but I’m happy for now.
I still haven’t gotten mine to work yet. Which pages did you edit? I’m assuming that you just added:
<?php get_sidebar.php; ?>
I got mine working with the following mods.
1) I added <?php get_sidebar.php; ?> before <?php get_footer.php; ?> in single Post ( single.php .
2) I changed <div id=”content” class=”widecolumn”> to <div id=”content” class=”narrowcolumn”>.
You’re a star Soggybag!
I thought that I had originally did it, but when trying to set up my blog so that registered users could comment, no comment option was coming up because I’d renamed single.php to nosingle.php.
So my investigation of template heirarchy was incorrect LOL, but you live and learn and you’re certainly a lifesaver as it’s working for me.
- The topic ‘Kubric, displaying the sidebar’ is closed to new replies.