The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Easy Featured Content
Shortcode (1 post)

  1. Bev
    Posted 3 years ago #

    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 );


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Easy Featured Content
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.