Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • tyberdev

    (@tyberdev)

    Oops! I forgot. Another easy way to keep your widgets and add new ones is to move the location of this line of code <?php endif; ?> which is most likely at the bottom of your sidebar.php file and movie it directly below this line of code <?php if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar() ) : ?>

    Hope this helps.

    tyberdev

    (@tyberdev)

    Hi SoundCitizen,

    The sidebar.php file in your theme likely has this line of code in it.

    <?php if ( !function_exists(‘dynamic_sidebar’) || !dynamic_sidebar() ) : ?>

    Thus, once you add a new widget, Word Press disregards the code in the sidebar.php file until it reaches the “end” code, and instead displays the widgets you have selected in the Word Press GUI. If you would like to keep all of the sidebar widgets that come with your theme and add new widgets, you can install the particular plugins that you would like to add and then add the corresponding php code to your theme’s sidebar.php file

    Cheers!

Viewing 2 replies - 1 through 2 (of 2 total)