WordPress.org

Ready to get started?Download WordPress

Forums

Posts in Sidebar
[resolved] Custom CSS class? (2 posts)

  1. paddelboot
    Member
    Posted 10 months ago #

    Nice plugin. I can add custom CSS styles, but I cannot define a custom CSS class for the widget wrapper. So some of my CSS styles are now in styles.css, some are in the widget's options field.

    Please provide us with a possibility to enter a custom CSS class.

    Thanks,

    Paddelboot

    http://wordpress.org/plugins/posts-in-sidebar/

  2. aldolat
    Member
    Plugin Author

    Posted 10 months ago #

    Open the functions.php file of your current theme and look for the function that creates the sidebar. For example, in the Twenty Twelve theme you should look for this:

    function twentytwelve_widgets_init() {

    Inside this function change this line:

    'before_widget' => '<aside id="%1$s" class="widget %2$s">',

    into:

    'before_widget' => '<aside id="%1$s" class="widget my-class %2$s">',

    I added my-class, obviously you'll type the class you need.

    Note that this will change the wrapper of every widget.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.