{"id":11231236,"date":"2019-02-21T12:51:08","date_gmt":"2019-02-21T12:51:08","guid":{"rendered":"https:\/\/wordpress.org\/support\/topic\/esi-wordpress-function\/"},"modified":"2019-02-21T12:51:08","modified_gmt":"2019-02-21T12:51:08","slug":"esi-wordpress-function","status":"publish","type":"topic","link":"https:\/\/wordpress.org\/support\/topic\/esi-wordpress-function\/","title":{"rendered":"ESI \/\/ WordPress Function"},"content":{"rendered":"<p>Hi,<\/p>\n<p>on our homepage, we\u00b4ve got a Onlineshop Widget in the header, which counts the number of products in the basket. This widget comes out of a function, which is located in seperate .php file and included via the wp functions.php. <\/p>\n<pre><code>&lt;div class=&quot;header-cart&quot;&gt; \n&lt;?php wpsg_cart_link(); ?&gt;\n&lt;?php wpsg_cart_dropdown(); ?&gt; \n&lt;\/div&gt;&lt;!-- End .header-cart --&gt;<\/code><\/pre>\n<p>The LS Cache is working perfect on the page, except that we had to exclude all pages to get the widget show the correct number of products. So i\u00b4m thinking of the ESI function of LightSpeed Cache, to exclude only the widget (or even more the corresponding code) &#8230;<\/p>\n<p>I\u00b4ve already enabled ESI it and try to integrate &lt;esi:inline&gt;, but nothing worked properly, or the widget isn\u00b4t shown.<\/p>\n<p>`&lt;esi:inline name=&#8221;\/basket&#8221; &gt;<br \/>\n&lt;div class=&#8221;header-cart&#8221;&gt;<br \/>\n&lt;\/esi:inline&gt;<br \/>\n&lt;?php wpsg_cart_link(); ?&gt;<\/p>\n<p>Is that the correct usage or i\u00b4m on the wrong way regarding the useage of ESI? I\u00b4m not so familar with the technical integration &#8230;<\/p>\n<p>Would be very happy, if someone had a suggestion or idea &#8230;<\/p>\n<p>Many thanks in advance<br \/>\n&lt;?php wpsg_cart_dropdown(); ?&gt;<br \/>\n&lt;\/div&gt;&lt;!&#8211; End .header-cart &#8211;&gt;<\/p>\n","protected":false},"template":"","class_list":["post-11231236","topic","type-topic","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/topic\/11231236","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\/11231236\/revisions"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/support\/wp-json\/wp\/v2\/media?parent=11231236"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}