
Create custom endpoint to wp rest-api
- or -
Post a project like this2806
$$$
- Posted:
- Proposals: 8
- Remote
- #1853714
- Awarded
⭐⭐⭐⭐⭐ Python | Wordpress | Shopify | AI | Data Science | React | PHP | Flutter ⭐⭐⭐⭐⭐

Top rated PHP Web Development | WordPress | Magento | Drupal | OpenCart | PrestaShop | Joomla

Fullstack developer : PHP-MySQL | Wordpress | Android | iOS| Laravel | Codeigniter| Woocommerce | Magento 2 | REST API
INDIA'S No 1 Mobile app and Web app company |Android |iOS| Flutter| React Native| Ionic| AngularJS| ReactJS| NodeJS| Java| Spring| ROR|PHP|Laravel|CodeIgniter|Yii|WordPress|Magento|Drupal|Shopify

Web Developer | E-commerce Specialist | Web Designer | Wordpress Developer
19431669624819831311050754231850409153182645884164




Description
Experience Level: Expert
Estimated project duration: 1 day or less
General information for the website: Event listing
Description of requirements/features: I need to create custom endpoint to wp rest-api
The custom endpoint should get the posts based on a location radius search.
I have a custom post type (let's call it event). Each event post has a location created with ACF google map field. This is saved in the DB something like this a:3:{s:7:”address”;s:51:”70671 Bluewater Highway Grand Bend, Ontario N0M 1T0″;s:3:”lat”;s:10:”43.3203177″;s:3:”lng”;s:18:”-81.75439059999997″;}
Right now I can easily fetch my event posts by category at /wp-json/wp/v2/myCustomPostType?filter[taxonomy]=category&filter[term]=myCategoryName&offset=0&per_page=10
What I want is an endpoint that looks something like this: /wp-json/wp/v2/myCustomPostType?filter [location]=distance&latitude=52.000044&longitude=-0.0842720&radius=10&orderByDistance &offset=0&per_page=10
It should work also on taxonomy filter like this: /wp-json/wp/v2/myCustomPostType?filter[taxonomy]=category&filter[term]=myCategoryName &[location]=distance&latitude=52.000044&longitude=-0.0842720&radius=10&orderByDistance &offset=0&per_page=10
The above url should list all the events located on 10 mile radius distance from the address latitude=52.000044&longitude=-0.0842720
The posts are ordered by distance.
In phase 2 I would like to have also an option to get the posts in the radius but to order them by date:
[location]=distance&latitude=52.000044&longitude=-0.0842720&radius=10&orderByDistance=10&orderByDate
This posts:
https://wordpress.org/support/topic/rest-api-with-geolocation-queries/
and
https://www.slideshare.net/bhogg/working-with-geolocation-in-wordpress
has some details about how to create a REST API with geolocation queries.
It should be a straight forward job for an experienced php/wp dev.
Specific technologies required: Wordpress
Extra notes:
I want the all the code in the scope to be included in a plugin built with https://wppb.me/
No external plugins to be included
Description of requirements/features: I need to create custom endpoint to wp rest-api
The custom endpoint should get the posts based on a location radius search.
I have a custom post type (let's call it event). Each event post has a location created with ACF google map field. This is saved in the DB something like this a:3:{s:7:”address”;s:51:”70671 Bluewater Highway Grand Bend, Ontario N0M 1T0″;s:3:”lat”;s:10:”43.3203177″;s:3:”lng”;s:18:”-81.75439059999997″;}
Right now I can easily fetch my event posts by category at /wp-json/wp/v2/myCustomPostType?filter[taxonomy]=category&filter[term]=myCategoryName&offset=0&per_page=10
What I want is an endpoint that looks something like this: /wp-json/wp/v2/myCustomPostType?filter [location]=distance&latitude=52.000044&longitude=-0.0842720&radius=10&orderByDistance &offset=0&per_page=10
It should work also on taxonomy filter like this: /wp-json/wp/v2/myCustomPostType?filter[taxonomy]=category&filter[term]=myCategoryName &[location]=distance&latitude=52.000044&longitude=-0.0842720&radius=10&orderByDistance &offset=0&per_page=10
The above url should list all the events located on 10 mile radius distance from the address latitude=52.000044&longitude=-0.0842720
The posts are ordered by distance.
In phase 2 I would like to have also an option to get the posts in the radius but to order them by date:
[location]=distance&latitude=52.000044&longitude=-0.0842720&radius=10&orderByDistance=10&orderByDate
This posts:
https://wordpress.org/support/topic/rest-api-with-geolocation-queries/
and
https://www.slideshare.net/bhogg/working-with-geolocation-in-wordpress
has some details about how to create a REST API with geolocation queries.
It should be a straight forward job for an experienced php/wp dev.
Specific technologies required: Wordpress
Extra notes:
I want the all the code in the scope to be included in a plugin built with https://wppb.me/
No external plugins to be included

Florin B.
100% (2)Projects Completed
3
Freelancers worked with
3
Projects awarded
43%
Last project
22 Jan 2018
Romania
New Proposal
Login to your account and send a proposal now to get this project.
Log inClarification Board Ask a Question
-
Florin, please share your website link.
569737
We collect cookies to enable the proper functioning and security of our website, and to enhance your experience. By clicking on 'Accept All Cookies', you consent to the use of these cookies. You can change your 'Cookies Settings' at any time. For more information, please read ourCookie Policy
Cookie Settings
Accept All Cookies