WordPress.org

Forums

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

  1. paddelboot
    Member
    Posted 1 year 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 1 year 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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Posts in Sidebar
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.