robinmatt94
Forum Replies Created
-
Forum: Plugins
In reply to: [Page Visit Counter] Sort by Countsreturn $b[‘count’] – $a[‘count’]; // descanding from high to low
return $a[‘count’] – $b[‘count’]; // ascending from low to highForum: Plugins
In reply to: [Page Visit Counter] Total Views count shows "0" when posting to FacebookHere you go with solving this problem.
https://ww.wp.xz.cn/support/topic/total-visits-shown-in-title-when-an-article-shared-in-facebook/
After installing I find the following code in my overall code of every page!
there you set the title after the standard title at top of the page.
So this code will change the title that got set in the beginning of the page.<script type=’text/javascript’>
/* <![CDATA[ */
var pagevisit = {“ajaxurl”:”https:\/\/bodycheckers-bodyshop.de\/wp-admin\/admin-ajax.php”,”pageurl”:”https:\/\/bodycheckers-bodyshop.de\/partnerprogramme”};
/* ]]> */
</script>
<script type=’text/javascript’ src=’https://bodycheckers-bodyshop.de/wp-content/plugins/page-visit-counter/public/js/custom.js?ver=1.0.0′></script>
<script type=’text/javascript’ src=’https://bodycheckers-bodyshop.de/wp-content/themes/enfold/js/avia-compat.js?ver=2′></script>
<link rel=’https://api.w.org/’ href=’https://bodycheckers-bodyshop.de/wp-json/’ />
<link rel=”EditURI” type=”application/rsd+xml” title=”RSD” href=”https://bodycheckers-bodyshop.de/xmlrpc.php?rsd” />
<link rel=”wlwmanifest” type=”application/wlwmanifest+xml” href=”https://bodycheckers-bodyshop.de/wp-includes/wlwmanifest.xml” />
<meta name=”generator” content=”WordPress 4.7.2″ />
<meta name=”generator” content=”WooCommerce 2.6.14″ />
<link rel=’shortlink’ href=’https://bodycheckers-bodyshop.de/?p=1118′ />
<link rel=”alternate” type=”application/json+oembed” href=”https://bodycheckers-bodyshop.de/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fbodycheckers-bodyshop.de%2Fpartnerprogramme” />
<link rel=”alternate” type=”text/xml+oembed” href=”https://bodycheckers-bodyshop.de/wp-json/oembed/1.0/embed?url=https%3A%2F%2Fbodycheckers-bodyshop.de%2Fpartnerprogramme&format=xml” />
<meta property=”og:locale” content=”en_US” />
<meta property=”og:title” content=”Partnerprogramme | Total Visits 39 | Bodychecker's Bodyshop” />
<meta property=”og:url” content=”https://bodycheckers-bodyshop.de/partnerprogramme” />
<meta property=”og:site_name” content=”Bodychecker's Bodyshop” />
<meta name=”twitter:card” content=”summary_large_image”/>
<meta name=”twitter:title” content=”Partnerprogramme | Total Visits 39 | Bodychecker's Bodyshop”/>
<link rel=”profile” href=”http://gmpg.org/xfn/11″ />Okay i found the reason:
The php File “page-visit-counter/public/class-page-visit-counter-public.php” sets at the end the following code:
$total = (int) isset( $pageCount[0]->total ) ? $pageCount[0]->total : 0;
$page_social_content = $page_title.’ | Total Visits ‘.$total.’ | ‘.$site_title;
$current_page_url = get_page_link($page_id);
echo ‘<meta property=”og:locale” content=”en_US” />
<meta property=”og:title” content=”‘.$page_social_content.'” />
<meta property=”og:url” content=”‘.$current_page_url.'” />
<meta property=”og:site_name” content=”‘.$site_title.'” />
<meta name=”twitter:card” content=”summary_large_image”/>
<meta name=”twitter:title” content=”‘.$page_social_content.'”/>
‘;}
/**
* BN code added
*/function paypal_bn_code_filter($paypal_args) {
$paypal_args[‘bn’] = ‘Multidots_SP’;
return $paypal_args;
}
}It’s really at the very end of the file.
Just delete the echo with the meta properties and it won’t link with total count.
There is really the Total Visits in the Code!
http://www.bilder-upload.eu/show.php?file=3bc80f-1487700299.jpg
Why do you have to change the title?
- This reply was modified 9 years, 3 months ago by robinmatt94.