• Resolved Babak Fakhamzadeh

    (@mastababa)


    I want to import CSV data which includes links to images that need to be included into the WordPress media library and then associated with the newly imported pages.

    The description of this plugin mentions Action hooks, which I should be able to use to achieve this, if I’m not mistaken.

    Reading the documentation at github, is my understanding correct that my approach could be this:

    1. Set up my CSV such that the links to images (which reside on the server with the WordPress installation in question) will be imported as custom fields.
    2. Add the function from https://gist.github.com/hissy/fe0aa2582b78394a3a82 to my functions.php file.
    3. Update the functionality of “public function add_comment($post)” to have the custom image fields be read for each post and the images referenced in those fields be moved into the media library.
    4. Associate the newly added images with the newly imported post.

    https://wordpress.org/plugins/really-simple-csv-importer/

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Action hooks?’ is closed to new replies.