• Hi,
    I want to display 600k custom taxonomies in the form of country>> state>> district>> city in my classifieds website but when I tried directly on my website it started freezing right uploading 100k taxonomies. Then I came to know that WordPress requires a lot of meta which is causing the problem. So, now I want to display and make those taxonomies work in the search bar with the help of WP-API. Can anyone help me with a way how to achieve this?
    Thanks a lot.

Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator bcworkz

    (@bcworkz)

    I hope you mean 100k taxonomy terms ?? It’s still a lot of records, but by default there is no meta data related to terms. Themes or plugins might add some though. Frequently the term description takes up more space than the rest of a term’s data.

    Some WP functions (like ones that output a dropdown form field) will arbitrarily limit query results to 100 or so.

    Anyway, for custom taxonomies to be accessible in the API, when the taxonomy is registered, it must include 'show_in_rest'=> true, in its arguments.

    Thread Starter pranuthi

    (@pranuthi)

    Hi,
    Thank you very much for your reply. Is it possible to access taxonomies from my own server from another database? Is it a better solution than api?

    Thank you.

    Moderator bcworkz

    (@bcworkz)

    From another database? Databases don’t make remote requests, web servers or client devices do. In any case, if exposed to the API as mentioned, remote servers or clients can access your taxonomy data through the API. In some cases proper authentication may be required. A REST API is considered the modern way to get remote data, but your site could be customized to handle other sorts of remote requests. You could still use XML-RPC, Ajax or even plain old HTTP requests through admin-post.php. IMO, the API is the best approach in general, but for those with the requisite coding skills, depending on the need, Ajax or requests through admin-post.php might offer simpler solutions.

    Thread Starter pranuthi

    (@pranuthi)

    Thank You very much for your help.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘want to display custom taxonomies through api in wordpress’ is closed to new replies.