Title: Same Widget, Different Styling
Last modified: August 21, 2016

---

# Same Widget, Different Styling

 *  Resolved [GeorgeNegas](https://wordpress.org/support/users/georgenegas/)
 * (@georgenegas)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/same-widget-different-styling/)
 * Hello!
 * Your widget is amazing! It does all the things I wanted to do!
 * I am only facing the following issue:
 * I need to create two/or more versions of the widget.
    In one version I need the
   post title to be centered and in the other centered. I am adding a global container
   with this CSS class but no luck!
 * What would be the right way to code it? The website im using the plugin on is
   [http://www.hashmag.gr](http://www.hashmag.gr)
 * Many Thanks in advance!
 * [https://wordpress.org/plugins/posts-in-sidebar/](https://wordpress.org/plugins/posts-in-sidebar/)

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

 *  Thread Starter [GeorgeNegas](https://wordpress.org/support/users/georgenegas/)
 * (@georgenegas)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/same-widget-different-styling/#post-5031803)
 * Correction: In one centered and the other justified/left!
 *  Plugin Author [Aldo Latino](https://wordpress.org/support/users/aldolat/)
 * (@aldolat)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/same-widget-different-styling/#post-5031815)
 * Hi,
    you can stylize almost every element of the widget using selectors and classes.
   Use the HTML Inspector of your browser for this.
 * When you create a new widget, WordPress will assign a number to that widget (
   for example, `pis_posts_in_sidebar-3` for a widget and `pis_posts_in_sidebar-
   7` for another widget of the same plugin). Using this selector, you can stylize
   the titles of the first widget in a way, and the titles of the second widget 
   in another way.
 * Please let me know if you need further help.
 *  Thread Starter [GeorgeNegas](https://wordpress.org/support/users/georgenegas/)
 * (@georgenegas)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/same-widget-different-styling/#post-5031816)
 * Thank you very much for your help!
 *  Thread Starter [GeorgeNegas](https://wordpress.org/support/users/georgenegas/)
 * (@georgenegas)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/same-widget-different-styling/#post-5031817)
 * Your help was most appreciated!
 *  Plugin Author [Aldo Latino](https://wordpress.org/support/users/aldolat/)
 * (@aldolat)
 * [11 years, 11 months ago](https://wordpress.org/support/topic/same-widget-different-styling/#post-5031830)
 * 🙂
 *  [basicfm](https://wordpress.org/support/users/basicfm/)
 * (@basicfm)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/same-widget-different-styling/#post-5032040)
 * Hi,
 * Just to add to this. I’m having a hard time finding the assigned number for each
   version of the widget I am using. I am using Chrome and inspect element, but 
   both versions seem to be displaying as ‘posts-in-sidebar’ with no additional 
   number. I guess I’m looking in the wrong place. Any pointers or advice greatly
   received!
 * Just to elaborate,I added:
 * `.pis-excerpt { border-bottom: 3px solid #7af4a3; padding-bottom: 10%; }`
 * To one version and I am trying to stop that border bottom from appearing in another
   version.
 *  Plugin Author [Aldo Latino](https://wordpress.org/support/users/aldolat/)
 * (@aldolat)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/same-widget-different-styling/#post-5032041)
 * I really didn’t understand your needs.
 * Do you use two different versions of the same plugin?
    Also, what do you want
   to do in detail?
 *  [basicfm](https://wordpress.org/support/users/basicfm/)
 * (@basicfm)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/same-widget-different-styling/#post-5032042)
 * Hi,
 * Sorry for the confusion. My problem seemed similar to the original poster which
   is why I followed this thread.
 * I am using this plug in more than once. I set one instance to have a border bottom.
   I cannot stop the second instance from also having the same border bottom, despite
   adding {border-bottom: none} to the second instance of this widget.
 * I guess I am struggling to find the two different selectors.
 *  Plugin Author [Aldo Latino](https://wordpress.org/support/users/aldolat/)
 * (@aldolat)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/same-widget-different-styling/#post-5032043)
 * Hi,
    you have to search for a HTML tag similar to this:
 * `<aside id="pis_posts_in_sidebar-4" class="widget posts-in-sidebar">`
 * Now, if you create a style like this:
 * `#pis_posts_in_sidebar-4 .pis-excerpt { border-bottom: 3px solid #7af4a3; padding-
   bottom: 10%; }`
 * it will work only for any `.pis-excerpt` descendant of `#pis_posts_in_sidebar-
   4`
 * If you need further help, let me know the URL of the site. I will be happy to
   help you.
 *  [basicfm](https://wordpress.org/support/users/basicfm/)
 * (@basicfm)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/same-widget-different-styling/#post-5032044)
 * Hi,
 * Thanks for this. I figured it out with your help!
 * The reason I wasn’t getting a number was because each instance was sitting inside
   another widget that was generating a number (Responsive column widgets). I fixed
   it like so:
 * `.responsive_column_widgets_3 .pis-excerpt { border-bottom: none;}`
 * Thanks Aldolat, You are a star.
 *  Plugin Author [Aldo Latino](https://wordpress.org/support/users/aldolat/)
 * (@aldolat)
 * [11 years, 7 months ago](https://wordpress.org/support/topic/same-widget-different-styling/#post-5032045)
 * You’re welcome and… thanks for the feedback! 🙂

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

The topic ‘Same Widget, Different Styling’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/posts-in-sidebar_aed6f1.svg)
 * [Posts in Sidebar](https://wordpress.org/plugins/posts-in-sidebar/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/posts-in-sidebar/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/posts-in-sidebar/)
 * [Active Topics](https://wordpress.org/support/plugin/posts-in-sidebar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/posts-in-sidebar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/posts-in-sidebar/reviews/)

 * 11 replies
 * 3 participants
 * Last reply from: [Aldo Latino](https://wordpress.org/support/users/aldolat/)
 * Last activity: [11 years, 7 months ago](https://wordpress.org/support/topic/same-widget-different-styling/#post-5032045)
 * Status: resolved