Donor Funding Page
This will document all the elements of the donor funding screen.
1. Screen header
The information required for the screen text and the header image can be retrieved so:

Get page information
Getting the page title and the page's featured image requires two steps (2 requests)
Request the page information
curl -X GET 'https://maforum.ippf.org/wp-json/wp/v2/pages/10' \ --header 'x-connect-allow: string' \ --header 'Authorization: Bearer token'{ "id": 10, "date": "2024-05-31T09:54:33", "date_gmt": "2024-05-31T09:54:33", "guid": { "rendered": "http://ma-forum.staging/?page_id=10" }, "modified": "2024-07-15T17:43:12", "modified_gmt": "2024-07-15T17:43:12", "slug": "acces-to-funding", "status": "publish", "type": "page", "link": "https://maforum.ippf.org/acces-to-funding/", "title": { "rendered": "Donor Funding" }, "content": { "rendered": "", "protected": false }, "excerpt": { "rendered": "", "protected": false }, "author": 1, "featured_media": 115, "parent": 0, "menu_order": 0, "comment_status": "closed", "ping_status": "closed", "template": "page-funding-tpl.php", "meta": { "_acf_changed": false, "inline_featured_image": false, "footnotes": "" }, "class_list": [ "post-10", "page", "type-page", "status-publish", "has-post-thumbnail", "hentry" ], "acf": { "bt_title": "Funding Opportunities", "bt_description": "<p>Restricted donor funding represents the majority of the Federation’s income. It is the backbone of our operations.</p>\n<p>The Secretariat continually monitors the donor landscape for MA funding opportunities. In the table below are the current opporunities identified for your convenience.</p>\n<p>Should you wish to apply for one of the funding opportunities, please use the apply here button in the table. Any questions can be sent to MAForum@ippf.org.</p>\n", "bt_image": { "ID": 1016, "id": 1016, "title": "80873_opt", "filename": "80873_opt.jpg", "filesize": 142897, "url": "https://maforum.ippf.org/wp-content/uploads/2024/07/80873_opt.jpg", "link": "https://maforum.ippf.org/acces-to-funding/80873_opt/", "alt": "", "author": "1", "description": "", "caption": "", "name": "80873_opt", "status": "inherit", "uploaded_to": 10, "date": "2024-07-15 17:43:09", "modified": "2024-07-15 17:43:09", "menu_order": 0, "mime_type": "image/jpeg", "type": "image", "subtype": "jpeg", "icon": "https://maforum.ippf.org/wp-includes/images/media/default.png", "width": 800, "height": 800, "sizes": { "thumbnail": "https://maforum.ippf.org/wp-content/uploads/2024/07/80873_opt-150x150.jpg", "thumbnail-width": 150, "thumbnail-height": 150, "medium": "https://maforum.ippf.org/wp-content/uploads/2024/07/80873_opt-300x300.jpg", "medium-width": 300, "medium-height": 300, "medium_large": "https://maforum.ippf.org/wp-content/uploads/2024/07/80873_opt-768x768.jpg", "medium_large-width": 768, "medium_large-height": 768, "large": "https://maforum.ippf.org/wp-content/uploads/2024/07/80873_opt.jpg", "large-width": 800, "large-height": 800, "1536x1536": "https://maforum.ippf.org/wp-content/uploads/2024/07/80873_opt.jpg", "1536x1536-width": 800, "1536x1536-height": 800, "2048x2048": "https://maforum.ippf.org/wp-content/uploads/2024/07/80873_opt.jpg", "2048x2048-width": 800, "2048x2048-height": 800, "medium-thumb-size": "https://maforum.ippf.org/wp-content/uploads/2024/07/80873_opt-500x500.jpg", "medium-thumb-size-width": 500, "medium-thumb-size-height": 500 } } }, "lang": "en", "translations": { "en": 10, "es": 10120, "fr": 10116, "ar": 10124 }, "pll_sync_post": [], "_links": { "self": [ { "href": "https://maforum.ippf.org/wp-json/wp/v2/pages/10", "targetHints": { "allow": [ "GET", "POST", "PUT", "PATCH", "DELETE" ] } } ], "collection": [ { "href": "https://maforum.ippf.org/wp-json/wp/v2/pages" } ], "about": [ { "href": "https://maforum.ippf.org/wp-json/wp/v2/types/page" } ], "author": [ { "embeddable": true, "href": "https://maforum.ippf.org/wp-json/wp/v2/users/1" } ], "replies": [ { "embeddable": true, "href": "https://maforum.ippf.org/wp-json/wp/v2/comments?post=10" } ], "version-history": [ { "count": 7, "href": "https://maforum.ippf.org/wp-json/wp/v2/pages/10/revisions" } ], "predecessor-version": [ { "id": 1017, "href": "https://maforum.ippf.org/wp-json/wp/v2/pages/10/revisions/1017" } ], "wp:featuredmedia": [ { "embeddable": true, "href": "https://maforum.ippf.org/wp-json/wp/v2/media/115" } ], "wp:attachment": [ { "href": "https://maforum.ippf.org/wp-json/wp/v2/media?parent=10" } ], "curies": [ { "name": "wp", "href": "https://api.w.org/{rel}", "templated": true } ] } }- Title
Ex. "Donor Funding" -
title->rendered- Header image
Get the column
featured_mediaand make the media request below.
Request the media info based on information from the page request's response
To get the featured image, you use the column
featured_mediawhich contains the ID of the media item.curl -X GET 'https://maforum.ippf.org/wp-json/wp/v2/media/{id}' \ --header 'x-connect-allow: string' \ --header 'Authorization: Bearer token'{ "id": 36, "date": "2024-06-03T06:27:27", "date_gmt": "2024-06-03T06:27:27", "guid": { "rendered": "http://ma-forum.staging/wp-content/uploads/2024/06/home-image-opt.jpg" }, "modified": "2024-06-03T06:27:27", "modified_gmt": "2024-06-03T06:27:27", "slug": "home-image-opt", "status": "inherit", "type": "attachment", "link": "https://maforum.ippf.org/ma-forum/home-image-opt/", "title": { "rendered": "home-image-opt" }, "author": 1, "featured_media": 0, "comment_status": "", "ping_status": "closed", "template": "", "meta": { "_acf_changed": false, "inline_featured_image": false }, "class_list": [ "post-36", "attachment", "type-attachment", "status-inherit", "hentry" ], "acf": [], "lang": "en", "translations": { "en": 36, "fr": 9298, "es": 9306, "ar": 9314 }, "pll_sync_post": [], "description": { "rendered": "<p class=\"attachment\"><a href='https://maforum.ippf.org/wp-content/uploads/2024/06/home-image-opt.jpg'><img decoding=\"async\" width=\"300\" height=\"176\" src=\"https://maforum.ippf.org/wp-content/uploads/2024/06/home-image-opt-300x176.jpg\" class=\"attachment-medium size-medium\" alt=\"\" srcset=\"https://maforum.ippf.org/wp-content/uploads/2024/06/home-image-opt-300x176.jpg 300w, https://maforum.ippf.org/wp-content/uploads/2024/06/home-image-opt-1024x602.jpg 1024w, https://maforum.ippf.org/wp-content/uploads/2024/06/home-image-opt-768x451.jpg 768w, https://maforum.ippf.org/wp-content/uploads/2024/06/home-image-opt-1536x902.jpg 1536w, https://maforum.ippf.org/wp-content/uploads/2024/06/home-image-opt.jpg 1920w\" sizes=\"(max-width: 300px) 100vw, 300px\" /></a></p>\n" }, "caption": { "rendered": "" }, "alt_text": "", "media_type": "image", "mime_type": "image/jpeg", "media_details": { "width": 1920, "height": 1128, "file": "2024/06/home-image-opt.jpg", "filesize": 195319, "sizes": { "medium": { "file": "home-image-opt-300x176.jpg", "width": 300, "height": 176, "filesize": 18839, "mime_type": "image/jpeg", "source_url": "https://maforum.ippf.org/wp-content/uploads/2024/06/home-image-opt-300x176.jpg" }, "large": { "file": "home-image-opt-1024x602.jpg", "width": 1024, "height": 602, "filesize": 134639, "mime_type": "image/jpeg", "source_url": "https://maforum.ippf.org/wp-content/uploads/2024/06/home-image-opt-1024x602.jpg" }, "thumbnail": { "file": "home-image-opt-150x150.jpg", "width": 150, "height": 150, "filesize": 9371, "mime_type": "image/jpeg", "source_url": "https://maforum.ippf.org/wp-content/uploads/2024/06/home-image-opt-150x150.jpg" }, "medium_large": { "file": "home-image-opt-768x451.jpg", "width": 768, "height": 451, "filesize": 85834, "mime_type": "image/jpeg", "source_url": "https://maforum.ippf.org/wp-content/uploads/2024/06/home-image-opt-768x451.jpg" }, "1536x1536": { "file": "home-image-opt-1536x902.jpg", "width": 1536, "height": 902, "filesize": 243107, "mime_type": "image/jpeg", "source_url": "https://maforum.ippf.org/wp-content/uploads/2024/06/home-image-opt-1536x902.jpg" }, "medium-thumb-size": { "file": "home-image-opt-500x500.jpg", "width": 500, "height": 500, "filesize": 63891, "mime_type": "image/jpeg", "source_url": "https://maforum.ippf.org/wp-content/uploads/2024/06/home-image-opt-500x500.jpg" }, "full": { "file": "home-image-opt.jpg", "width": 1920, "height": 1128, "mime_type": "image/jpeg", "source_url": "https://maforum.ippf.org/wp-content/uploads/2024/06/home-image-opt.jpg" } }, "image_meta": { "aperture": "0", "credit": "", "camera": "", "caption": "", "created_timestamp": "0", "copyright": "", "focal_length": "0", "iso": "0", "shutter_speed": "0", "title": "", "orientation": "0", "keywords": [] } }, "post": 25, "source_url": "https://maforum.ippf.org/wp-content/uploads/2024/06/home-image-opt.jpg", "_links": { "self": [ { "href": "https://maforum.ippf.org/wp-json/wp/v2/media/36", "targetHints": { "allow": [ "GET", "POST", "PUT", "PATCH", "DELETE" ] } } ], "collection": [ { "href": "https://maforum.ippf.org/wp-json/wp/v2/media" } ], "about": [ { "href": "https://maforum.ippf.org/wp-json/wp/v2/types/attachment" } ], "author": [ { "embeddable": true, "href": "https://maforum.ippf.org/wp-json/wp/v2/users/1" } ], "replies": [ { "embeddable": true, "href": "https://maforum.ippf.org/wp-json/wp/v2/comments?post=36" } ] } }- Image URL
Choose what size you want. I think you should go with large, but you check how it all displays.
media_details->sizes->large->source_url
2. Funding opportunities
The information required for this section can be retrieved from the original page query:

- Title
Ex. "Funding Opportunities" -
acf->bt_title.- Description
Ex. "Restricted donor ..." -
acf->bt_description- Image
acf->bt_image->url
3. Closing soon
The information required for this section can be retrieved so:

- Donor and Opportunity
For first part, ex: "FP205" -
acf->f_donor. For second part, ex: "FP20230.." -acf->f_opportunity.- Grant size
Ex. "Varies ..." -
acf->f_duration- Geographical scope
Ex. "Global South ..." -
acf->f_geographical_scope- Brief description
Ex. "FP2030 will ..." -
acf->f_description- Eligibility criteria
Ex. "Only civil ..." -
acf->f_eligibility- Deadline
Ex. "Challenges will be ..." -
acf->f_deadline_text- Apply url
acf->apply_link
4. Displaying funding articles

To get all funding articles, use the request below. Filtering will be shown in Postman collection, but displaying results is according to this method. By default, no filters applied.
- Donor and Opportunity
For first part, ex: "FP205" -
acf->f_donor. For the second part, ex: "FP20230.." -acf->f_opportunity.- Grant size
Ex. "Varies ..." -
acf->f_duration- Geographical scope
Ex. "Global South ..." -
acf->f_geographical_scope- Brief description
Ex. "FP2030 will ..." -
acf->f_description- Eligibility criteria
Ex. "Only civil ..." -
acf->f_eligibility- Deadline
Ex. "Challenges will be ..." -
acf->f_deadline_text- Apply url
acf->apply_link
5. Filtering
You will use the same call as above with filters. Those will be in the Postman collection.
Here are the filter columns and how to get the values for them.
a. OPEN CALL
Values are [{'name':'Open', 'value': 'open'}, {'name':'Closed', 'value': 'closed'}]
b. REGION
An API call must be made to retrieve values:
- Value
id- Name
name
c. DEADLINE
Use a datepicker and format values as YYYYMMDD. Please don't ask why. There's a shitty thing here because the date is stored like "20250123" and I can't sort it. If we could, you should filter the results locally for the date. Should display the results with deadline before the selected value.
d. FUNDING RANGE
It's a slider with values from 100000 to 500000
Same problem as above, because it's stored in the database as string, for ex. "0;5000" I can't filter for shit. So it should be done after getting the results.