Use template variables in more ways
-
I’d like to add a “tweet this” button after each entry, using the Twitter code below. When I try to use the {{permalink}} and {{title}} variables, it uses those of the page (instead of each feed item). Any ideas how to fix this?
<div class="hungryfeed_item"> <a href="{{permalink}}"><b>{{title}}</b></a> </div><a href="https://twitter.com/share" class="twitter-share-button" data-url="{{permalink}}" data-text="{{title}}" data-via="postvite" data-related="postvite" data-count="none">Tweet</a> <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Use template variables in more ways’ is closed to new replies.