Support

how to keep default widgets rather than overwrite them (Secondary) (4 posts)

Languages

de | fr | es | 日本語

About This Topic

Tags

  1. rss minutecoach

    junior member


    rss Posted 2 years ago
    #

    Hi Milo,
    In the Secondary theme, whenever I drag a new widget into one of the 7 slots, the pre-existing default widget you have placed there in the code just disappears - In some instances I'd like to still have the default display, and ADD my new widget below it.

    Can't seem to do this with this theme, dragging in my new widget makes the default widget disappear from the page.

    Any direction on how I might keep the default widget too?

    http://coachflakes.com

    kind regards,

    Philip

  2. rss milo

    moderator


    rss Posted 2 years ago
    #

    Open the sidebar templates or areas where the widgets are
    and look for this code:

    <?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar(1) ) : else : ?>

    < h3>Dialo<span>gue</span></ h3>
    <ul ><?php recent_cmts('8'); ?>< /ul >

    <h3 >User <span>Photos</span>< /h3>
    <?php get_flickrRSS(); ?>

    <?php endif; ?>

    example take from l_sidebar.php

    and move this line
    <?php endif; ?>
    before the hardcoded area, so it looks like this

    <div id="l_sidebar">

    <?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar(1) ) : else : ?>
    <?php endif; ?>

    < h3>Dialo<span>gue</span>< /h3>
    < ul><?php recent_cmts('8'); ?>< /ul>
    < h3>User <span>Photos</span>< /h3>
    <?php get_flickrRSS(); ?>
    </div>

    Now the widgetized area is before the hardcoded widget.

  3. rss milo

    moderator


    rss Posted 2 years ago
    #

    Everything in between this lines is a widgetized area

    <?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar(1) ) : else : ?>
    widget area
    <?php endif; ?>

    the number in brackets (1) indicates the widgetized sidebar by number.

    <?php if ( function_exists('dynamic_sidebar') && dynamic_sidebar(1) ) : else : ?>

  4. rss milo

    moderator


    rss Posted 2 years ago
    #

    Also pls post your solution mentioned at this thread.

Reply

You must log in to post.

Design by milo

Milo designs web sites that strike the perfect balance between professional high-class graphics, functionality, usability, user experience, and high performance.