• Ok, so if I want to add a piece of PHP into my sidebar, for example, to call this RSS plugin:
    <?php if (function_exists(‘clb_plus’)) { clb_plus(); } ?>
    I would just edit either lsidebar.php or rsidebar.php in my relevant themes directory.

    But what if I’m using widgets? ( Which I am ). Where do I insert the above code to appear in my sidebar? It seems that the widget sidebar is built up independently from the sidebar page templates.

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
  • If you use widgets… no matter what you edit in the sidebar code – it will NOT appear.
    The only way to go around this: put your code outside of the widegtized portion.

    Thread Starter pickledegg

    (@pickledegg)

    If you use widgets… no matter what you edit in the sidebar code – it will NOT appear.

    Thats what I’m saying, as I realise the widgetized sidebar is not the same one as the standard one. My question is, where is ‘outside’ of the widgetized portion? I assume its not lsidebar or rsidebar?

    Reading up a bit on widgets…
    https://automattic.com/code/widgets/themes/
    would reveal that the “widgetized” portion starts with
    <?php if ( !function_exists('dynamic_sidebar')

    … and it ends with
    <?php endif; ?>

    Everything before and after that is “outside”.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Editing sidebar if using Widgets’ is closed to new replies.