WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Widgetizing my Sidebar (12 posts)

  1. Mischif
    Member
    Posted 6 years ago #

    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.

  2. Jeremy Clark
    Moderator
    Posted 6 years ago #

    Very simple just a few lines of code. Instructions here.

  3. Mischif
    Member
    Posted 6 years ago #

    That's it? I read that before I posted, but I didn't think it'd work.

  4. Jeremy Clark
    Moderator
    Posted 6 years ago #

    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.

  5. Mischif
    Member
    Posted 6 years ago #

    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

  6. Jeremy Clark
    Moderator
    Posted 6 years ago #

    Paste your sidebar code to the pastebin and report back the link.

  7. Mischif
    Member
    Posted 6 years ago #

  8. Jeremy Clark
    Moderator
    Posted 6 years ago #

  9. Mischif
    Member
    Posted 6 years ago #

    Squee! It works! Thanks!

  10. Jeremy Clark
    Moderator
    Posted 6 years ago #

    Told you it was easy :)

  11. Mischif
    Member
    Posted 6 years ago #

    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?

  12. Jeremy Clark
    Moderator
    Posted 6 years ago #

    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/

Topic Closed

This topic has been closed to new replies.

About this Topic