function cam_standoutdeals_short_grid_shortcode($atts, $content = null) { extract(shortcode_atts(array( 'css_class' => '', 'title' => '', 'description' => '', ), $atts)); $args = array( 'post_type' => 'cam_standoutdeals', 'orderby' => 'ID', 'order' => 'DESC', 'posts_per_page' => 3, 'paged' => false, ); // Adjust for Practice Streams or Sectors if ('cam_practicestreams' == get_post_type()) { $args['meta_query'] = array( array( 'key' => 'cam_stand_out_deal_practice_areas', 'value' => get_the_ID(), 'compare' => 'LIKE', ), ); } elseif ('cam_sectors' == get_post_type()) { $args['meta_query'] = array( array( 'key' => 'cam_stand_out_deal_sector', 'value' => get_the_ID(), 'compare' => 'LIKE', ), ); } $output = ''; $loop = new WP_Query($args); if ($loop->have_posts()) : $output .= '

' . esc_html($title) . '

'; while ($loop->have_posts()) : $loop->the_post(); $post_tags = get_the_terms(get_the_ID(), 'stand_out_deals_tags'); $tag_array = array(); if ($post_tags && !is_wp_error($post_tags)) { foreach ($post_tags as $tag) { $tag_array[] = $tag->name; break; // Only one tag } } $tag_content = join(' | ', $tag_array); $output .= '
    '; if (!empty($tag_content)) { $output .= '
  • ' . esc_html($tag_content) . '
  • '; } $output .= '

' . esc_html(get_the_title()) . '

'; endwhile; $output .= '
'; endif; wp_reset_postdata(); return $output; } SEBI Act 1992 – Cyril Amarchand Mangaldas