Hi @vitodumas,
I think I saw an answer that this can be done in the Pro version.
Not sure where you read this but WordPress Popular Posts doesn’t have a “pro” version. The plugin is 100% free.
How to exclude the visible post in the most popular list using a shortcode?
This code snippet should do the trick:
/**
* Removes current popular post from the list.
*
* @param array $out
* @param array $pairs
* @param array $atts
* @return array $out
*/
function wpp_shortcode_ignore_current_post($out, $pairs, $atts) {
if ( is_single() ) {
$current_object_id = get_queried_object_id();
if ( isset($atts['pid']) ) {
$atts['pid'] = rtrim($atts['pid'], ',');
$atts['pid'] .= $atts['pid'] ? ', ' . $current_object_id : $current_object_id;
$out['pid'] = $atts['pid'];
} else {
$out['pid'] = $current_object_id;
}
}
return $out;
}
add_filter( 'shortcode_atts_wpp', 'wpp_shortcode_ignore_current_post', 1, 3 );
Add it to your theme’s functions.php file and you should be good to go.