WordPress.org

Ready to get started?Download WordPress

Forums

Same Widgets on all blogs (3 posts)

  1. fuzzie
    Member
    Posted 3 years ago #

    We have about 20 sub-blogs. I'd like all of them to use the same widgets on the sidebars. Is there an easy way to code that into the sidebar1.php and sidebar2.php instead of setting up each widget on each blog?
    Thanks!

  2. David Sader
    Member
    Posted 3 years ago #

    Remove the conditional dynamic_sidebar from the sidebar.php

    <?php if ( !function_exists('dynamic_sidebar') || !dynamic_sidebar() ) : ?>
    but keep the sidebar stuff…
    <?php endif; ?>

    Then remove the register_sidebar code form the functions.php

    <?php
    if ( function_exists('register_sidebar') )
    register_sidebar(array(
    'before_widget' => '',
    'after_widget' => '',
    'before_title' => '<h2>',
    'after_title' => '</h2>',
    ));
    ?>

    Then customize what you want directly in the sidebar.php

    http://codex.wordpress.org/Customizing_Your_Sidebar

  3. fuzzie
    Member
    Posted 3 years ago #

    Thanks, that helped a ton!
    Got it working.

Topic Closed

This topic has been closed to new replies.

About this Topic