1. Home
  2. Docs
  3. API
  4. Taxonomies

Taxonomies


Introduction
Endpoints

 

Introduction

Access taxonomies via the REST API using GeoDirectory Rest API End Point.

EndPoints

/wp-json/geodir/v2/taxonomies/

Output

{
    "gd_place_tags": {
        "name": "Place Tags",
        "slug": "gd_place_tags",
        "description": "",
        "types": [
            "gd_place"
        ],
        "hierarchical": false,
        "rest_base": "places/tags",
        "_links": {
            "collection": [
                {
                    "href": "http://local.newwp.test/wp-json/geodir/v2/taxonomies"
                }
            ],
            "wp:items": [
                {
                    "href": "http://local.newwp.test/wp-json/wp/v2/places/tags"
                }
            ],
            "curies": [
                {
                    "name": "wp",
                    "href": "https://api.w.org/{rel}",
                    "templated": true
                }
            ]
        }
    },
    "gd_placecategory": {
        "name": "Place Categories",
        "slug": "gd_placecategory",
        "description": "",
        "types": [
            "gd_place"
        ],
        "hierarchical": true,
        "rest_base": "places/categories",
        "_links": {
            "collection": [
                {
                    "href": "http://local.newwp.test/wp-json/geodir/v2/taxonomies"
                }
            ],
            "wp:items": [
                {
                    "href": "http://local.newwp.test/wp-json/wp/v2/places/categories"
                }
            ],
            "curies": [
                {
                    "name": "wp",
                    "href": "https://api.w.org/{rel}",
                    "templated": true
                }
            ]
        }
    }
}

/wp-json/geodir/v2/taxonomies//

Example

/wp-json/geodir/v2/taxonomies/gd_placecategory/

{
    "name": "Place Categories",
    "slug": "gd_placecategory",
    "description": "",
    "types": [
        "gd_place"
    ],
    "hierarchical": true,
    "rest_base": "places/categories",
    "_links": {
        "collection": [
            {
                "href": "http://local.newwp.test/wp-json/geodir/v2/taxonomies"
            }
        ],
        "wp:items": [
            {
                "href": "http://local.newwp.test/wp-json/wp/v2/places/categories"
            }
        ],
        "curies": [
            {
                "name": "wp",
                "href": "https://api.w.org/{rel}",
                "templated": true
            }
        ]
    }
}
Was this article helpful to you? Yes No