I have an XML feed from an API that I've fed into a Wordpress site using the plugin WPGetAPI. I can see the items in the feed and can pull elements onto my webpage.
What I'd like to achieve is placing the contents from the XML feed into an array, and then be able to take certain values from each item to drop into HTML blocks, and also loop them as there's typically several items in the feed. At the moment, I can only print the values in the order they appear in the feed, like so:
TITLE IMAGE
Whereas the layout I'd like is:
IMAGE TITLE BUTTON
The button isn't in the XML feed, but I can code that in HTML and then ideally add the item URL behind it.
So is this possible with PHP? I need to reorder the elements as they're not correct, and I don't know PHP to be able to do this myself.
Additionally, I'd also like to understand how to only select items from particular categories in the XML, and limit the amount of items (max 2) when displaying them.
Ideally I would like to understand and learn how to do this myself, as I may not be able to grant outsider access to the Wordpress site.
Company Info WordPress Site Build Category: Elementor, HTML, PHP, SEO, Web Development, Web Design, Website Optimization, WordPress Budget: $30 - $250 USD
30-Aug-2025 10:03 GMT
Finance Shorts 3D Motion Graphic Professional AE Editor Category: 3D Animation, 3D Design, 3D Rendering, After Effects, Animation, Motion Graphics, Video Editing, Video Post Editing, Video Production, Video Services Budget: ₹1500 - ₹12500 INR
Shopify Store Development for Premium Brand Category: ECommerce, HTML, Payment Gateway Integration, Shopify, Shopify Development, Web Design, Web Development Budget: ₹12500 - ₹37500 INR
30-Aug-2025 09:56 GMT
Add Cost Lines to Proposals Category: Accounting, Business Analysis, Business Management, Financial Analysis, Financial Consulting, Proposal Writing, Tax Compliance, Tax Management Consulting Budget: $250 - $750 USD
30-Aug-2025 09:56 GMT
Hosting, Server & Domain Consultant Category: API Integration, Cloud, Cloud Computing, PHP, Server, System Admin, Web Development, Web Hosting, Web Design Budget: ₹1500 - ₹12500 INR
30-Aug-2025 09:54 GMT
SEO audit for a website and analysis Category: Internet Marketing, Link Building, Marketing, SEO, SEO Auditing, User Experience Research, Website Audit, Website Optimization Budget: £20 - £250 GBP
30-Aug-2025 09:51 GMT
Prabhat Vinnakota Category: Adobe Illustrator, Photoshop, Advertising, Branding, Content Creation, Creative Design, Digital Marketing, Graphic Design, Illustration, Social Media Marketing Budget: ₹750 - ₹1250 INR
Gen Z New App User Acquisition Category: Content Marketing, Digital Marketing, Facebook Marketing, Influencer Marketing, Instagram Marketing, Lead Generation, Mobile App Development, Social Media Marketing, Twitter, Viral Marketing Budget: ₹600 - ₹1500 INR