• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 209
  • Last Modified:

WordPress - Generating custom XML file via Loop contents


I am wondering if it is possible to generate a custom XML file using WordPress. I want to pull information and create a google map with multiple markers. XML would be like:

<marker>HTML HERE FOR BOX</marker>

I would use a query to pull data from a custom post type. Can WordPress generate custom XML?


1 Solution
Ray PaseurCommented:
Not sure if WordPress is the right tool for this, but if we can see your test data input and desired outputs we can show you how to do it in PHP.  And since WP is written in PHP it might be easy to integrate the XML generator into your WP code.
Yes, you can do this.

You can also see examples in the google sitemap generator plugin, just open the plugin files and browse the code to get an idea of how they go about it.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now