1

I am trying to get the posts base on some parameters. My JSON API query is as follow. http://www.example.com/api/get_posts/?post_type=job_listing&page=10&count=5/

Here is my JSON result for custom post. So I want to pull the post by "taxonomy_job_loc".

"taxonomy_job_loc" is custom taxonomy. May I know how can I search by custom taxonomy.

"posts": [
{
  "id": 16107,
  "type": "job_listing",
  "slug": "chief-auditor-8",
  "url": "http:\/\/www.example.com\/jobs\/chief-auditor-8\/",
  "status": "publish",
  "title": "Chief Auditor",
  "title_plain": "Chief Auditor",
  "content": "<p><strong>Job Description<\/strong><\/p>\n<ul>\n<li>Set the strategic direction of the Internal Audit Department<br \/>\n\u2022 Establish policies and procedures to guide the Internal Audit Department<br \/>\n\u2022 Report periodically to Senior Management and the Audit Committee regarding Internal Audit\u2019s\u00a0\u00a0\u00a0\u00a0 purpose, authority, responsibility, and performance relative to its Annual Audit Plan in accordance with the Internal Audit Charter<br \/>\n\u2022 Develop and maintain a system to monitor the disposition of results communicated to management.<br \/>\n\u2022 Ensure adequate department resources to execute the Internal Audit activities .<br \/>\n\u2022 Overall resourcing and communication\/coordination within company flows from CAE through manager to team.<\/li>\n<\/ul>\n<p><strong>Requirement<\/strong><\/p>\n<ul>\n<li>\nMust be thoroughly familiar with internal auditing and accounting principles, risk and control principles<br \/>\n\u2022 Must be familiar with Institute of Internal Auditors standards and necessary processes to ensure compliance<br \/>\n\u2022 Must have CPA and CIA (strongly preferred graduate education is preferred MBA)<br \/>\n\u2022 Must be able to create, lead courageously and inspire high performance teams<br \/>\n\u2022 Must be a strategic, innovative thinker with strong leadership capabilities and a progressive track record in audit, risk and compliance.<\/li>\n<\/ul>\n",
  "excerpt": "<p>Job Description Set the strategic direction of the Internal Audit Department \u2022 Establish policies and procedures to guide the Internal Audit Department \u2022 Report periodically to Senior Management and the Audit Committee regarding Internal Audit\u2019s\u00a0\u00a0\u00a0\u00a0 purpose, authority, responsibility, and performance relative to its Annual Audit Plan in accordance with the Internal Audit Charter \u2022 Develop [&hellip;]<\/p>\n",
  "date": "2015-05-27 16:12:56",
  "modified": "2015-05-27 16:12:56",
  "categories": [

  ],
  "tags": [

  ],
  "author": {
    "id": 730,
    "slug": "supreme",
    "name": "Supreme",
    "first_name": "Supreme",
    "last_name": "HR",
    "nickname": "Supreme",
    "url": "",
    "description": ""
  },
  "comments": [

  ],
  "attachments": [

  ],
  "comment_count": 0,
  "comment_status": "open",
  "custom_fields": {
    "geo_address": [
      "Yangon"
    ],
    "geo_country": [
      "Republic of the Union of Myanmar"
    ],
    "geo_short_address": [
      "Yangon"
    ],
    "geo_short_address_country": [
      "Yangon Region, Republic of the Union of Myanmar"
    ],
    "jr_daily_count": [
      "2"
    ],
    "jr_total_count": [
      "28"
    ]
  },
  "taxonomy_job_loc": [
    {
      "id": 1287,
      "slug": "yangon",
      "title": "Yangon",
      "description": "",
      "parent": 0,
      "post_count": 290
    }
  ],
  "taxonomy_job_type": [
    {
      "id": 3,
      "slug": "full-time",
      "title": "Full-Time",
      "description": "",
      "parent": 0,
      "post_count": 315
    }
  ],
  "taxonomy_job_tag": [

  ],
  "taxonomy_job_salary": [

  ]
},
2

I assume you're using this plugin? From the docs it seems you can use standard query arguments, so try:

/api/get_posts/?job_loc=yangon&page=10&count=5

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.