WordPress.org

Forums

Widgetizing a side bar and allowing for certain outside plugins? (1 post)

  1. Joni
    Member
    Posted 8 years ago #

    Before widgets came onto the scene, I had gotten into the habit of putting provisional code into my sidebar to run a certain plugin if it existed and to ignore it if it did not. Here is an example:

    <!-- YEARS PAST ARCHIVES -->
    <?php if (function_exists('showYearsAgo')) { ?>
    <li id="yearsago"><h2>Daze Gone By</h2>
    <ul>
    <?php showYearsAgo(3,'<li>','</li>',true,'.'); ?>
    </ul>
    </li>
    <?php } ?>

    Is this kind of coding still necessary when developing themes and if so, how can it be implemented in the sidebar that has the widgetizing code in it? In other words, I just need to know where to put this code.

    Thanks!

Topic Closed

This topic has been closed to new replies.

About this Topic