J'essaie de fonder les articles sur certains paramètres. Ma requête API JSON est la suivante. http://www.example.com/api/get_posts/?post_type=job_listing&page=10&count=5/
Voici mon résultat JSON pour un post personnalisé. Je veux donc tirer le message par "taxonomy_job_loc".
"taxonomy_job_loc" est une taxonomie personnalisée. Puis-je savoir comment puis-je effectuer une recherche par taxonomie personnalisée?.
"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 […]<\/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": [
]
},
Je suppose que vous utilisez ce plugin ? D'après la documentation , il semble que vous puissiez utiliser des arguments de requête standard. Essayez donc:
/api/get_posts/?job_loc=yangon&page=10&count=5