Support » Plugins » Add a new Page from an external script

  • my site acts as a catalog and each item has it’s own dedicated page. some of the content is database driven and some of it exists as plain text in the dedicated page.

    It’s a real pain having to create a blank page then add my data to the database then go back and add content to the page.

    I would like to be able to feed WP some basic info from an external php script… say title URL, author, date, template, and parent page and then have that page created automatically.

    This is NOT a plugin but would be a standalone script external to WP…

    if there is some way to do this I would be very interested in hearing it.

Viewing 7 replies - 1 through 7 (of 7 total)
  • whooami



    It can be done, yes. I know this because I just had a hand in the recoding of script that that uses takes some input off another site, and based on the info off that page, populated all of the necessary fields in the write post page.

    is it easy to do? Not for someone without any PHP knowledge. Can it be done for free? Probably not.

    well I have quite a bit of php knowledge… I’ve written many of my own WP plugins among other things. I’ve done similar stuff before, for instance I wrote a plugin that creates a new Simple Machine Forum topic whenever a new WP post is published and then uses SMF as the comment system for the topics.

    I’m not asking for someone to do this for me I simply want to know which files, which functions and which objects need to be used, and if there are any kinds of hoops I need to jump through to get the job done.

    Look at the xml-rpc stuff (in the root directory) if you really want to do that. The code’s all there. It’s used by Windoze clients to post, don’t see why your app couldn’t do the same.

    OK I’ve read through all the XML-RPC stuff I can find and I’ve found a few examples of how to create a “post” with an older version of WP, none of which seem to work now… i haven’t found any information about creating a “page” with it though, which is what I really need to do…

    basically i have a PHP app separate from WP, I know everything about what I want to publish to my WP page I need to be able to set at least these three parameters: title, parent page, and template

    things that I don’t need to set but might be handy:
    page content, permalink, custom fields, author.

    and I need to know the WordPress ID of the newly created page. Notice that I don’t need to actually set the content, this is because the template I’m using connects to an external database and populates a lot of content for me… most of the time when I create these pages the actual page content is empty.

    I’m getting to know PHP pretty well and I’ve made a few small WP plugins and written a handful of database driven we sites, but this XML-RPC stuff is above my head and I’m not even sure if it can do what I want it to do.

    Is there any documentation or example code for creating a WP page with the currently used version of xml-rpc?

    Is there an alternative method I can use if this doesn’t work?

    any help would be appreciated…

    I still need a method to :
    create a new page with the following properties:
    -specific title text
    -specific parent page
    -specific template

    and get the newly created page ID in return…

    XML-RPC doesn’t seem like it’s flexible enough to do that, not to mention I can’t find any reliable documentation, never mind something that covers the specifics of what I’m looking for.

    I too need to create pages dynamically through a scripting, wondering how to do so…

    I still haven’t resolved this issue… the XLM-RPC looks like it should work, but I’ve yet to find any good documentation on how to use this for my needs.

    I know my way around php pretty well at this point but the XLM-RPC stuff is just over my head. I’d need a good breakdown of how it works or an example of a similar use.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Add a new Page from an external script’ is closed to new replies.