Support » Plugins » adding a widget-only plug in as html code in the sidebar

Viewing 6 replies - 1 through 6 (of 6 total)
  • 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.

    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? 😕

    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.

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    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.

    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 🙁

    Moderator Samuel Wood (Otto)

    (@otto42) Admin

    Not really. You can always use an ExecPHP widget for those older plugins that don’t have widgets of their own:

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘adding a widget-only plug in as html code in the sidebar’ is closed to new replies.