Support

Account

Home Forums General Issues Remove current post/page from relationship field Reply To: Remove current post/page from relationship field

  • This is for disable the current post

    //I got the result when i change $post to $post->ID//

    //3. $post argument passed in from the query hook is the $post->ID.
    $args[‘post__not_in’] = array( $post->ID );

    Thanks Jamie