• Resolved batcoderstech

    (@batcoderstech)


    So I am trying to the change the URL for the post being updated and I want the current post ID to be a part of it but $articleData[‘ID’] does not return anything.

    The following is my code –

    function my_pmxi_article_data( $articleData, $import, $post_to_update, $current_xml_node ) {
    global $post;
    $listingid = $articleData[‘ID’];
    $articleData[‘post_name’] = $articleData[‘post_title’].$listingid;
    return $articleData;
    }
    add_filter(‘pmxi_article_data’, ‘my_pmxi_article_data’, 10, 4);

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘articleData[‘ID’] doesn’t give current post ID’ is closed to new replies.