WordPress.org

Ready to get started?Download WordPress

Forums

JSON API
show featured image in output page. (3 posts)

  1. buzzy0777
    Member
    Posted 1 year ago #

    How can i output the image "full" ?
    when i type this address to the post i get this and i want to grab
    the full img, how?

    http://localhost/knytpunktfyrudden/ata/kartorp?json=1

    title":"Kartorp","description":"","caption":"","parent":208,
    "mime_type":"image\/jpeg","images":{"full":

    this is the output script, that shows title and content on the page
    how can i add the image "full"?

    function showPost(id) {
    	$.getJSON('http://localhost/knytpunktfyrudden/category/ata/?json=get_post&post_id=' + id + '&callback=?',
    	function(data) {
    		var output='';
    		output += '<h3>' + data.post.title + '</h3>';
    		output += data.post.content;
    		$('#mypost_ata').html(output);
    	}); //get JSON Data for Stories
    } //showPost

    http://wordpress.org/extend/plugins/json-api/

  2. buzzy0777
    Member
    Posted 1 year ago #

    I can get to the image with the console.log- but not in the output, how should I write?

    function listPosts(data) {
    	console.log(data.posts[0].attachments[0].images.large.url);
    }

    Help! anyone.

  3. Jowy92
    Member
    Posted 1 year ago #

    Hi all !

    Same question : How can I get the url of the "full" featured image ?

    Thanks by advance ;)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic