javascript - Json callback single post by id -
i have problem single post page wordpress , show on mobile jquery page. need full list of posts; , on click, need open single post.
this code list of posts:
$.getjson("http://www.mcaps.at/redesign/api/get_posts/?post_type=reference_member", function posts(data) { var output='<ul data-role="listview" data-inset="true" data-divider-theme="c">'; $.each(data.posts, function(key,ref){ output += '<li class="show-more" >'; output += '<a href="#blog-post" onclick="showpost(' + ref.id + ')">'; output += '<h3>' + ref.title + '</h3>'; output += '<img src=" ' + ref.thumbnail + ' " />'; output += '</a>'; output += '</li>'; }); output+='</ul>'; $('#referenzen-content').html(output); });
how single post id? thanks!
Comments
Post a Comment