Title: Shortcode
Last modified: August 20, 2016

---

# Shortcode

 *  Anonymous User
 * (@anonymized-1391468)
 * [13 years, 2 months ago](https://wordpress.org/support/topic/shortcode-32/)
 * Nice plugin!
 * I wanted to use this with a shortcode, so I tied into the Display Posts Shortcode
   plugin by adding a filter to the shortcode args. I thought I’d share the code
   here. Use it by adding featured=’yes’ to your shortcode.
 *     ```
       function fc_display_posts_shortcode_featured( $args, $atts ) {
   
       	if( isset($atts['featured']) && ($atts['featured'] == 'yes') ) {
       		$args['meta_key'] = Featured_Content::IS_FEATURED_CONTENT_KEY;
       		$args['meta_value'] = 'yes';
       	}
   
       	return $args;
       }
       add_filter( 'display_posts_shortcode_args', 'fc_display_posts_shortcode_featured', 10, 2 );
       ```
   
 * [http://wordpress.org/extend/plugins/easy-featured-content/](http://wordpress.org/extend/plugins/easy-featured-content/)

The topic ‘Shortcode’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/easy-featured-content.svg)
 * [Easy Featured Content](https://wordpress.org/plugins/easy-featured-content/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/easy-featured-content/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/easy-featured-content/)
 * [Active Topics](https://wordpress.org/support/plugin/easy-featured-content/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/easy-featured-content/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/easy-featured-content/reviews/)

 * 0 replies
 * 1 participant
 * Last reply from: Anonymous User
 * Last activity: [13 years, 2 months ago](https://wordpress.org/support/topic/shortcode-32/)
 * Status: not a support question