{"id":11811436,"date":"2019-08-08T08:14:50","date_gmt":"2019-08-08T08:14:50","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/page-fragement-caching\/"},"modified":"2019-08-08T08:14:50","modified_gmt":"2019-08-08T08:14:50","slug":"page-fragement-caching","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/page-fragement-caching\/","title":{"rendered":"Page fragement caching"},"content":{"rendered":"<p>Hello there,<\/p>\n<p>I&#8217;ve started out using your page fragment &lt;!&#8211; mfunc with some success, thanks for a great feature !<\/p>\n<p>But am running into some issues when trying to echo with a $post-&gt;ID.<\/p>\n<p>The portion of the code I&#8217;m trying to fragment :<\/p>\n<p><code>&lt;!-- mfunc code --&gt; global $post; echo getHotThumb($post-&gt;ID, false, true); &lt;!-- \/mfunc code --&gt;<\/code><\/p>\n<p>The first load of the cache page works perfectly, but on the next load, I get the following error from WordPress : Notice: Trying to get property &#8216;ID&#8217; of non-object. Thus the thumb count shows 0. <\/p>\n<p>I&#8217;m a beginner in all this, so if I have it all wrong, your help would be appreciated \ud83d\ude42 Thanks !<\/p>\n","protected":false},"template":"","class_list":["post-11811436","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/11811436","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\/11811436\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=11811436"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}