WordPress.org

Ready to get started?Download WordPress

Forums

Importing posts and images from a custom CMS system (1 post)

  1. nemo.vrusso
    Member
    Posted 5 years ago #

    Hello everybody,

    even though I am not sure this is the right forum to write this post to, I couldn't find a better place. Plus, I'm sorry if this question has been already solved in another post, but I couldn't find anything related to this.

    Ok. Let's say I have the need to import contents from another system, which has a number of "posts" each of them consisting of a:

    * title;
    * body;
    * an image on the same server and included in the body by the means of the 'img' HTML tag.

    What I want to do is the following:

    1. import each image into the WordPress media manager, in a proper way (I explain this below);
    2. import the title and the body
    3. replacing the 'src' of the image in the each post's body with the new 'src' according to the image importing above.

    What I mean with "proper way to import images" is that I need an API (o more APIs) to import an image file into the WordPress media manager, such that I can obtain the following:

    * the result of the media manager post processing (the original image, the resized 'medium' image, the 'thumb' version of the image);
    * the path to each of the above, so I can accomplish the point 3. above.

    I was not able to find anything useful in the WordPress documentation.

    I hope I was clear enough.

    Thank you all in advance.

    Cheers,

    Vincenzo.

Topic Closed

This topic has been closed to new replies.

About this Topic