• Hi,

    I have successfully imported over 800 posts from Hubspot but I have two issues.

    1) The Published Date for each post is showing as the date/time of import, not the date that they were originally published in hubspot.

    2) No media has been imported or assigned as a featured image. In addition any inline media still has its source referencing a hubspot url.

    I would love to get these two things sorted as other than them your plugin is perfect and a massive timesaver!

    Cheers,

    Will

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter wgstjf

    (@wgstjf)

    Sorted issue with published date and featured image not being assigned by doing the following to the inc/hubspot_blog_admin.php file:

    1) Added the following to the $post_arr array:

    
    'post_date' => date('Y-m-d H:i:s',$row['created_time']/1000) // Must be divided by 1000 to get secconds not milliseconds
    

    2) Modified the line that follows $posted_id = …. to the following:

    
    if (!empty($row['featured_image'])) {
    hbwp_fetch_media($row['featured_image'],$posted_id,$row['featured_image_alt_text']);
    } else {
    hbwp_fetch_media($row['post_body'],$posted_id,'');
    }
    

    Might be of help to someone… ??

    Thread Starter wgstjf

    (@wgstjf)

    Forgot to mention…

    To fix the issue with categories not being assigned change this line

    
    array_push($categories_all, $term->term_id);
    

    to this:

    
    array_push($categories_all, $term['term_id']);
    

    Cheers

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Import issues with date and media’ is closed to new replies.