• Hi Friends,

    I am using wordpress 3.1.2. Doing website in wordpress. at the same time i have doubt in my project.

    So I am using WordPress Json API plugin and getting value in json file.

    this is my code:-
    <script type=”text/javascript”>
    $.ajax({
    type: “GET”,
    url: “api/get_recent_posts/?custom_fields=gallery_thumb,gallery_zoom&slug=’micro-series'”,
    dataType: “json”,
    success: function(data){
    $.each(data.posts, function(index, value) {
    $(“#images”).append(‘<img src=”‘+value.custom_fields.gallery_thumb+'”/>’);
    });
    }
    });
    </script>

    and i have four categories for Example:
    1.Brand Design
    2.Marketing Strategies
    3.Micro Series
    4.Mobile Content

    each and everyone has 10 to 15 posts.

    those posts have two custom fields one is gallery_thumb and gallery_zoom.

    Now i want to get the gallery_thumb images from brand design category.

    how can i get brand design categories thumbnail images only..

    thank u

    vjn

Viewing 1 replies (of 1 total)
  • Thread Starter vjn_23

    (@vjn_23)

    Thanks Guys i solved my problem……

    just replace this code :-
    <script type=”text/javascript”>
    $.ajax({
    type: “GET”,
    //url: “api/get_recent_posts/?custom_fields=gallery_thumb,gallery_zoom&slug=’brand-design'”,
    url: “api/get_category_posts/?custom_fields=gallery_thumb,gallery_zoom&slug=’marketing-stratgies'”,
    dataType: “json”,
    success: function(data){
    $.each(data.posts, function(index, value) {
    $(“#thumb-images”).append(‘<img src=”‘+value.custom_fields.gallery_thumb+'”/>’);
    });
    }
    });
    </script>

Viewing 1 replies (of 1 total)
  • The topic ‘Using Json getting my category images????’ is closed to new replies.