Title: Changing styles for Shortcode use
Last modified: December 28, 2017

---

# Changing styles for Shortcode use

 *  [djcrowley](https://wordpress.org/support/users/djcrowley/)
 * (@djcrowley)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/changing-styles-for-shortcode-use/)
 * I customized some styles using the Widget interface, and I would like to reproduce
   those changes on a page that uses the shortcode. For a simple example, I want
   to change the h3 font-weight. Can a new style be passed via the shortcode? What
   is the recommended approach?
    In the thread about “[Different styles per widget area](https://wordpress.org/support/topic/different-styles-per-widget-area/)“,
   the answer was to use a CSS ID. This approach might work for my needs, but I 
   don’t know where I should define these new styles. E.g. should I edit the $css_defaults
   block in the functions.php file? I am a novice at understanding WP styles hierarchy,
   so if possible please be clear about which file to edit thank you.

Viewing 1 replies (of 1 total)

 *  Thread Starter [djcrowley](https://wordpress.org/support/users/djcrowley/)
 * (@djcrowley)
 * [8 years, 5 months ago](https://wordpress.org/support/topic/changing-styles-for-shortcode-use/#post-9821039)
 * Update: Here’ a solution based on a CSS ID, in this case “#rpwe_mystyle”. Please
   critique if there’s a better way:
 * 1. Add a style definition to the **main style.css of your child-theme** e.g.
 *     ```
       #rpwe_cdasr.rpwe-block h3{
           ...include all the plugin's attributes...;
           font-weight: 700;
       }
       ```
   
 * 2.In the [rpw] shortcode, include “cssID=rpwe_mystyle”

Viewing 1 replies (of 1 total)

The topic ‘Changing styles for Shortcode use’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/recent-posts-widget-extended_3384ca.
   svg)
 * [Recent Posts Widget Extended](https://wordpress.org/plugins/recent-posts-widget-extended/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/recent-posts-widget-extended/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/recent-posts-widget-extended/)
 * [Active Topics](https://wordpress.org/support/plugin/recent-posts-widget-extended/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/recent-posts-widget-extended/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/recent-posts-widget-extended/reviews/)

## Tags

 * [css](https://wordpress.org/support/topic-tag/css/)

 * 1 reply
 * 1 participant
 * Last reply from: [djcrowley](https://wordpress.org/support/users/djcrowley/)
 * Last activity: [8 years, 5 months ago](https://wordpress.org/support/topic/changing-styles-for-shortcode-use/#post-9821039)
 * Status: not resolved