{"id":5084170,"date":"2014-07-10T05:17:38","date_gmt":"2014-07-10T05:17:38","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/view-variable\/"},"modified":"2016-08-21T23:08:24","modified_gmt":"2016-08-21T23:08:24","slug":"view-variable","status":"closed","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/view-variable\/","title":{"rendered":"View variable"},"content":{"rendered":"<p>Hello and thank you for this great plugin!<br \/>\nMy theme has a default counter which is not accurate and I want to replace it by this plugin.<br \/>\nI found the code in my theme as follow:<\/p>\n<pre><code>$output = &#039;&lt;span class=&quot;fa fa-eye&quot;&gt;&lt;\/span&gt;&lt;span class=&quot;c5-views&quot;&gt;&#039; . $this-&gt;custom_number_format($count) . &#039;&lt;\/span&gt;&#039;;\n        return $output;\n    }<\/code><\/pre>\n<p>I believe the counter is this portion:<br \/>\n<code>$this-&gt;custom_number_format($count)<\/code><br \/>\nBut when I replace it by:<br \/>\n<code>get_post_meta( $post-&gt;ID, &#039;jetpack-post-views&#039;, true )<\/code><br \/>\nIt doesn&#8217;t print anything.<br \/>\nYour help is highly appreciated!<\/p>\n<p>https:\/\/wordpress.org\/plugins\/jetpack-post-views\/<\/p>\n","protected":false},"template":"","class_list":["post-5084170","topic","type-topic","status-closed","hentry","topic-tag-single-post-view"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/5084170","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic"}],"about":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/types\/topic"}],"version-history":[{"count":0,"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/5084170\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=5084170"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}