Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • 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

    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)

    John,

    Outstanding solution, many thanks!

    In case anyone else is interested. This does work! The only thing you need to do is specify the orderby and order in your args whenever you query the posts as adding the above solution removes the plugin’s default values of

    'orderby'	=> 'menu_order',
    'order'			=> 'ASC',

    An example might be that you have a slider for testimonials that you want a random selection to be used but on the testimonials page you want them to appear in the order specified in the admin area.

    Thanks again John and all the best,

    Will

    Did anyone get the exec-php plugin working in the pages section of datafeedr? I have made sure that I do not have any other formatting in the content. It seems that the exec-php plugin just doesn’t execute on the datafeedr content…

    Any help greatly appreciated.

Viewing 4 replies - 1 through 4 (of 4 total)