Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter jobhesk

    (@jobhesk)

    this is what i got so far..

    jQuery.fn.hkmtype_event_indexpage = function() {
    	this.html("");
    	var Dis = this;
    	var url = wsm_base_obj.domainbasejson + "get_recent_posts&post_type=hkmtype_event&order_by=date&order=desc&count=4";
    	jQuery.ajax(url).done(function(jsonlocal) {
    		//eval("var o=" + jsonlocal + ";");
    		if (jsonlocal.status != "ok") {
    			alert("request error... line 75");
    			return false;
    		}
    		var data = jsonlocal.posts;
    		//alert(data.length);
    		for (var i = 0; i < data.length; i++) {
    			h = "<div class=\"item even_poster line\">" + data[i]["title_plain"] + "</div>";
    			//alert(data[i]["title_plain"]);
    			Dis.append(h).click(function() {
    					//alert("this is go");
    			//loop it all
    			});
    		}
    	});
    Thread Starter jobhesk

    (@jobhesk)

    this is how I get started..

    get_recent_posts
    &post_type=hkmtype_event
    &order_by=date
    &order=desc&count=4

    now what can i do to include the feature image url into the json object??

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: JSON API] give me an example’ is closed to new replies.