WP-API

This topic contains 6 replies, has 4 voices, and was last updated by  Kiran 6 years, 9 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #459193

    Timothy Myers
    Free User
    Post count: 2

    Does GeoDirectory support v2 WP-API? All the references I can find are to v1. Thanks for any detail you can point me to. Thanks! Tim

    #459195

    Kor
    Moderator
    Post count: 16516

    Hi Timothy,

    Thanks for your post. Could you possibly tell us what you’re trying to achieve there? Maybe we could point you the right direction without the need to add snippets to your Website.

    Thanks!

    #459197

    Timothy Myers
    Free User
    Post count: 2

    Yes, I’m trying to access the GeoDirectory custom post type for classified capabilities we have set up through a v2 REST call mostly because I’m lazy and have it all done for v2 where I can then add additional meta fields like price etc. to my content listing…which is on a mobile app.

    Thanks!

    #459205

    Alex Rollin
    Moderator
    Post count: 27815

    the url to the v2 api is /wp-json/geodir/v2/
    All routes are listed there, most things can be figured out from there but we will be doing more specific examples soon.

    #459207

    Timothy Myers
    Free User
    Post count: 2

    Does one need to be on the v2 Beta GeoDirectory to get this to work? I tried it https://www.<sitename&gt;.com/wp-json/geodir/v2/classifieds/ and I get rest_no_route for everything…works fine with https://www.<sitename&gt;.com/wp-json/geodir/v1/classifieds/ … where “classifieds” is my post name.

    Thanks for the help!
    Tim

    #459249

    Alex Rollin
    Moderator
    Post count: 27815

    Sorry, yes, that is from V2.

    V1 routes are here: https://wpgeo.directory/rest-api/

    #459272

    Kiran
    Moderator
    Post count: 7069

    Hello,

    If you talking about plugin WP-API plugin then in WordPress 4.5 this no longer required. Because WordPress has moved WP-API to core with inbuilt feature.

    To use API with GeoDirectory you have to use v2 in all api route, like https://www.YOURSITE.com/wp-json/geodir/v2/

    Example: https://ppldb.com/v2/wp-json/geodir/v2/.

    Make sure API settings enabled at GeoDirectory > Settings > API > Enable the REST API.

    Kiran

Viewing 7 posts - 1 through 7 (of 7 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
20% Discount Offer
Hurry! Get your 20% discount before it expires. Get 20% Discount