• Krdm

    (@krdm)


    Hello,

    I want to change the css of one sidebar. To edit the css of one sidebar I will need the id, which is why I looked it up in the functions.php file.

    register_sidebar(array(
    ‘name’ => ‘SlidingBar Widget 4’,
    ‘id’ => ‘slidingbar-widget-4’,
    ‘before_widget’ => ‘<div id=”%1$s” class=”slidingbar-widget-col %2$s”>’,
    ‘after_widget’ => ‘<div style=”clear:both;”></div></div>’,
    ‘before_title’ => ‘<h3>’,
    ‘after_title’ => ‘</h3>’,
    ));

    Since I can´t use the id ´slidingbar-widget-4 (Tried that, didn’t work), is it possible to change the before_widget id to: ‘before_widget’ => ‘<div id=”slidingbar-widget-4″ (because that seemed to work) without losing it after updates? So if I change the id and update my theme, will the id stay the same or will it change back to what it was?

    Thanks! I Really appreciate the help!

Viewing 5 replies - 1 through 5 (of 5 total)
  • esmi

    (@esmi)

    What theme are you using? Where did you download it from?

    leapoahead

    (@leapoahead)

    Hi, you can use Child Themes, so it is safe do work out your own sidebar style sheet instead of overriding it. Does this solve your pain?

    Thread Starter Krdm

    (@krdm)

    I’m using Avada, downloaded it from themefusion. I did make a child theme and I know it’s possible to create a new sidebar in a child functions.php and use the id to change the css, just wondering if it’s also possible to edit the before widget id, because it don’t really understand what ‘%1$s’ is supposed to do as an id

    esmi

    (@esmi)

    I’m sorry but as you appear to be using a commercial theme, you need to seek support from the theme’s developer/vendor. We do not support commercial products here.
    Try http://themeforest.net/user/ThemeFusion

    Generally speaking, %1$s is used in PHP to indicate a substitution – in this case the first variable passed by the handling function. Have a look at http://codex.wordpress.org/Function_Reference/register_sidebar

    Thread Starter Krdm

    (@krdm)

    Okay, thanks.

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

The topic ‘CSS on sidebar’ is closed to new replies.