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.
Social Media Lead Generation Specialist Category: Content Marketing, Content Strategy, Content Writing, Copywriting, Facebook Marketing, Instagram Marketing, Lead Generation, Social Media Marketing Budget: ₹1500 - ₹12500 INR
3D Website, Animated Logo & Marketing Category: 3D Animation, 3D Design, 3D Modelling, Animation, JavaScript, SEO, Unity 3D, Web Development Budget: ₹12500 - ₹37500 INR
B2B Sales Specialist for Game Marketing Category: Account Management, B2B Marketing, Business Development, Internet Marketing, Lead Generation, Marketing, Sales, Social Media Marketing Budget: $5 - $10 USD
18-Sep-2025 09:56 GMT
Translate English Fiction Works Category: Content Writing, Creative Writing, English (UK) Translator, English (US) Translator, English Translation, Language Tutoring, Proofreading, Translation Budget: ₹12500 - ₹37500 INR
18-Sep-2025 09:55 GMT
Android MDM expert require Category: Android, Android App Development, Android SDK, Mobile App Development, Mobile Development Budget: min ₹2500 INR
18-Sep-2025 09:54 GMT
C++ Developer Needed to fix some Bugs Category: C, Programming, C#, C++, Game Design, Game Development, Game Testing, Unity 3D, Unreal Engine Budget: $30 - $250 USD