How to display thumbnail AngularJS and WordPress
-
Hello,
I have some like that:
<div class="post" ng-repeat="task in tasks"> <div class="img"><?php echo get_the_post_thumbnail( {{task.ID}} , 'thumbnail'); ?></div> <h3 class="title_post"><a href="{{task.post_name}}"><?php echo $pid; ?>{{task.post_title}}</a></h3> </div>All works fine – title is showing up
{{task.post_title}}but how to display post thumbnail ? When I do some like above that doesnt work.I was try insert
{{task.ID}}into php varible like$id = "{{task.ID}";and $id was showing up for each post but wehn I put it into function likeget_the_post_thumbnail( $id , 'thumbnail');that also doesnt works.Any suggestions ?
The topic ‘How to display thumbnail AngularJS and WordPress’ is closed to new replies.