Salvatore
asked 6 years ago

Why google pluse doesn’t update with numbers of share?

2 Answers
Mirek Kroupa
answered 6 years ago
Salvatore Viola
replied 6 years ago

Hi Mirek, thank yiu a lot! But can you tell me excatly where to put that code? I’m not a programmer 🙁

DominicStaff
answered 6 years ago

To resolve this issue please follow my instruction here:
1. Open functions.php file in /wp-content/themes/dw-focus/functions.php 2. Replace following code from line 412 to line 417 

$twitter_count = dw_get_twitter_count( $url );
// //Twitter
// $twitter_count = dw_get_twitter_count( $url );
$facebook_count = dw_get_facebook_count( $url );
$linkedin_count = dw_get_linkedin_count( $url );
$gplus_count = dw_get_plusones_share_count( $url );

with:

$twitter_count = dw_get_twitter_count( get_permalink() );
$facebook_count = dw_get_facebook_count( $url );
$linkedin_count = dw_get_linkedin_count( get_permalink() );
$gplus_count = dw_get_plusones_share_count( get_permalink() );

3. Replace following code from line 1104 to line 1105

// if( isset($json['result']) )
return intval( $json['result']['metadata']['globalCounts']['count'] );

with:

return intval( $json['result']['metadata']['globalCounts']['count'] );
Salvatore Viola
replied 6 years ago

IT WORKS!!!!!! THANXXXXX 😉

Powered by DW Question & Answer Pro