'', 'id_post' => '', 'position' => 'item-left', ),$attr)); if(empty($id_post)) $id_post = $post; if(!empty($id_post)){ $query = new WP_Query( array( 'post_type' => 'post', 'post__in' => array($id_post) )); if( $query->have_posts() ): while ( $query->have_posts() ) : $query->the_post(); $archive_year = get_the_time('Y'); $archive_month = get_the_time('m'); $archive_day = get_the_time('d'); $html .= '
'; if($position == 'item-right'){ $html .= '
'; } $html .= '

'.get_the_title().'

'.get_the_excerpt().'

'.esc_html__("Read more","bigc").'
'; if($position == 'item-left'){ $html .= '
'; } $html .= '
'; endwhile; endif; wp_reset_postdata(); } return $html; } } stp_reg_shortcode('sv_post_special','sv_vc_post_special'); vc_map( array( "name" => esc_html__("SV Post", 'bigc'), "base" => "sv_post_special", "icon" => "icon-st", "category" => '7Up-theme', "params" => array( array( "type" => "dropdown", "heading" => esc_html__("Post",'bigc'), "param_name" => "post", "value" => sv_get_list_post(), 'description' => esc_html__( 'Select post to show.', 'bigc' ), ), array( "type" => "textfield", "heading" => esc_html__("Post ID",'bigc'), "param_name" => "id_post", 'description' => esc_html__( 'Enter post ID to show. Default is select post value.', 'bigc' ), ), array( "type" => "dropdown", "heading" => esc_html__("Position",'bigc'), "param_name" => "position", "value" => array( esc_html__( 'Left', 'bigc' ) => 'item-left', esc_html__( 'Right', 'bigc' ) => 'item-right', ), 'description' => esc_html__( 'Set content position.', 'bigc' ), ), ) ));