Forums

adding a widget-only plug in as html code in the sidebar (7 posts)

  1. tarr
    Member
    Posted 1 year ago #

    I've my sidebar as I like it. I would like to add a plug in which only comes as a widget ( d4rss http://wordpress.org/extend/plugins/d4rss/ )
    If I activate this I loose all my sidebar elemnts. How can I solve this?

  2. moshu
    Moderator
    Posted 1 year ago #

    You may try to restrict the "widgetized" portion of your sidebar.php to only display that widget... and leave the rest of the code 'outside' of the dynamic sidebar's if/endif code.

  3. tarr
    Member
    Posted 1 year ago #

    That seems genious!
    But, how do I achieve this? Arte there special <widgets on/> <widgets off/> tags to put in the php of teh sidebar? :?

  4. moshu
    Moderator
    Posted 1 year ago #

    Every widgetized sidebar must have these lines:
    a) beginning -

    <?php if ( !function_exists('dynamic_sidebar')
            || !dynamic_sidebar(rightsidebar) ) : ?>

    ...all that stuff here...
    b) ending -
    <?php endif; ?>

    Everything in between will be overridden by the widgets if you use them.
    However, everything outside of this code will appear normally in the sidebar (above or below the widgetized portion), as you edited.

  5. Otto42
    Moderator
    Posted 1 year ago #

    In the long run, a better way would be to convert your existing sidebar to be all widgets instead. It doesn't take much effort.

  6. tarr
    Member
    Posted 1 year ago #

    Ok, otto 42, I hoped this could be done, but, call me stupid, I've not understood how, yet.

    The more I think about it, the less I like this widget feature. It is good for people who cannot cut'n'paste some code, but it conflicts with older WP plugins :(

  7. Otto42
    Moderator
    Posted 1 year ago #

    Not really. You can always use an ExecPHP widget for those older plugins that don't have widgets of their own: http://ottodestruct.com/blog/2006/04/09/fun-with-widgets/

Topic Closed

This topic has been closed to new replies.

About this Topic