Hello guys,
I am facing a problem while check quality of my newly created wordpress theme with Envato Theme Check plugin. I am getting this warning " The theme uses the add_shortcode() function. Custom post-content shortcodes are plugin-territory functionality.". The only shortcode i am using is in the custom element of wpbakery could you please help me out that how can i fix this. Here is the code
function get_vc_post( $atts, $content = null ) {
extract( shortcode_atts( array(
'number' => '',
'columns' => '',
'class' => '',
), $atts ) );
$args = array( 'posts_per_page' => $number);
$loop = new WP_Query( $args );
?>
<div class="row vc-recent-posts">
<?php while ( $loop->have_posts() ) : $loop->the_post(); ?>
<div class="<?php echo $columns; ?>">
<div class="post-thumbnails">
<a href="<?php echo get_post_permalink() ?>" title="<?php the_title(); ?>">
<div class="post-figure">
<?php the_post_thumbnail(); ?>
</div>
</a>
<div class="post-thumb-content">
<a href="<?php echo get_post_permalink() ?>" title="<?php the_title(); ?>">
<p class="post-publish-date">
<span><?php echo get_the_date(); ?></span>
</p>
</a>
<div class="post-thumb-summary">
<a href="<?php echo get_post_permalink() ?>" title="<?php the_title(); ?>">
<h5 class="post-thumb-title"><?php the_title();?></h5>
</a>
<p class="post-thumb-excerpts"><?php the_excerpt();?></p>
</div>
<div class="post-thumb-readmore">
<a href="<?php echo get_post_permalink() ?>" class="readmore-link" title="<?php the_title(); ?>">
<?php echo __('Continue Reading ', 'affiliator') ?>
</a>
</div>
</div>
</div>
</div>
<?php endwhile; /** Have Posts */
wp_reset_query(); ?>
</div>
<?php
}
add_shortcode( "blogpost", "get_vc_post" );