Viewing 1 replies (of 1 total)
  • Plugin Author David Aguilera

    (@davilera)

    Hi SonalM!

    Thanks for using our plugin ?? I’m sorry I couldn’t reply you before.

    I’ve updated the plugin and added a new filter (neliofp_get_featured_posts). You can use this filter to select which posts are shown under which pages as follows (add the code in your theme’s functions.php file):

    add_filter( 'neliofp_get_featured_posts', 'prefix_filter_posts' );
    function prefix_filter_posts( $feat_posts ) {
    
      if ( is_page() || is_single() ) {
        switch ( get_the_ID() ) {
    
          case 2: // The landing page, whose ID is 2
            $feat_posts = array( $feat_posts[0], $feat_posts[3] );
            break;
    
          case 27: // A certain post (ID 27)
            $feat_posts = array( $feat_posts[2] );
            break;
    
          // Add as many cases as required.
    
        }
      }
    
      return $feat_posts;
    }

    I hope this helps you! Please, don’t forget to add your review on our plugin.

Viewing 1 replies (of 1 total)
  • The topic ‘Showing specific featured posts’ is closed to new replies.