WordPress.org

Ready to get started?Download WordPress

Forums

Different code wrapping for each widget (1 post)

  1. godofcomics
    Member
    Posted 6 years ago #

    Hello, I cannot use the Array "Before" "After" to dress my widgets... I have real random and different coding for each widget.

    For example:

    Pages: Will be wrapped with have 4 divs

    Blogroll: Will be wrapped with 2 divs

    Is there a way to dress the "before" "after" for each WIDGET INDIVIDUALLY, instead of this array code from functions.php?

    <?php
    if ( function_exists('register_sidebar') )
        register_sidebar(array(
            'before_widget' => '<div id="right-red"><div id="right-red-top">',
            'after_widget' => '<div id="right-red-bottom"></div></div>',
            'before_title' => '<div id="right-red-title">',
            'after_title' => '</div><div id="right-red-text">%1$s</div></div>
    <ul>',
        ));

Topic Closed

This topic has been closed to new replies.

About this Topic