Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter tattoofinders

    (@tattoofinders)

    Hi there,

    I am still stuck trying to solve this problem. Could you offer your insights on how to solve this problem? Maybe the data has to be unserialized first before it can be imported using your plugin?

    Plugin Author vjinfotech

    (@vjinfotech)

    Hi,

    Thanks for getting in touch.

    Please use shortcode functionality for unserialize your data. https://plugins.vjinfotech.com/wordpress-import-export/documentation/add-shortcode/

    try this

    [ wpie_function custom_function = "wpie_get_my_images" date = "{images[1]}" ]
    
    function wpie_get_my_images( $attr = [], $content = "" )
    {
            $images = isset( $attr[ "images" ] ) ? $attr[ "images" ] : "";
            if( empty( $images ) )
            {
                    return "";
            }
            
            $images = maybe_unserialize($images);
            if( is_array( $images ) )
            {
                    implode( "||", $images );
            }
    
            return $images;
    }

    {images[1]} is your image field so replace it with your field from list

    let me know if you have any questions

    Thanks and have a nice day

    Thread Starter tattoofinders

    (@tattoofinders)

    Hi there,

    Thank you for your reply!

    When I try your method, I still get an error: https://prnt.sc/wfvawm

    Steps I have taken:
    1) I have copied your code into functions.php https://prnt.sc/wfv7dc
    2) I have renamed the image field in my excel document to ‘images’ to make sure you code works
    3) I have pasted your code in the importer. https://prnt.sc/wfv6st
    4) Use of shortcode is enabled.

    What am I doing wrong?

    • This reply was modified 3 years, 10 months ago by tattoofinders.
    Plugin Author vjinfotech

    (@vjinfotech)

    i am sorry it’s my mistake. i wrote date instead of images. do not add extra spaces before or after = (equal) sign.

    Please use

    [wpie_function custom_function="wpie_get_my_images" images="{images[1]}"]

    If not work then please mail me sample file on [email protected] with your issue with details. i will provide solution in minimum time.

    let me know if you have any questions

    Thanks and have a nice day

    • This reply was modified 3 years, 10 months ago by vjinfotech.
    • This reply was modified 3 years, 10 months ago by vjinfotech.
    • This reply was modified 3 years, 10 months ago by vjinfotech.
    • This reply was modified 3 years, 10 months ago by vjinfotech.
Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How to properly import images?’ is closed to new replies.