Widgetizing my Sidebar
-
I want to change my semi-static sidebar to a dynamic sidebar so I can use widgets, but I don’t know how to start. Can anyone help? I can gave the code for my sidebar on request.
-
Very simple just a few lines of code. Instructions here.
That’s it? I read that before I posted, but I didn’t think it’d work.
Yeah that’s it. A quick tip if you want to keep some of your sidebar content intact just add the code after where you want your widgets to start.
OK, so I tried that, but now when I try to put stuff in, it throws an error:
Parse error: syntax error, unexpected $end in /data/c8/nfsn/content/mischif/public/blog/wp-content/themes/Minima Blargh/sidebar.php on line 38
Paste your sidebar code to the pastebin and report back the link.
Fixed Code:
http://wordpress.pastebin.ca/745621Squee! It works! Thanks!
Told you it was easy 🙂
OK, now I’ve got a related problem. My old, non-widgetized sidebar had things like CSS/XHTML validating utilities, and I want to put them back. Do I make a new small text box and put HTML/PHP in there, or what?
EDIT: The small text box idea worked, but the text does not have the same formatting, plus any PHP in there doesn’t work. Any ideas?
You can try this updated sidebar code. That puts your meta info outside the widgetized sidebar. All you need to do is to add whatever you want to always be there after the
<?php endif; ?>http://wordpress.pastebin.ca/746691
For the php try this plugin.
http://wordpress.org/extend/plugins/exec-php/
The topic ‘Widgetizing my Sidebar’ is closed to new replies.