Populate tax_query terms parameter with post term

You have a couple of issues here.

  • As your code stand, $post is undefined. It is actually better to make use of get_the_ID() to get the post ID instead of $post

  • wp_get_post_terms() makes an extra db call, so if you are really set on performance, I would rather use get_the_terms()

  • You are returning term names, but then set the field parameter in your tax_query to slug. The field value should match the value of the term passed. Just a note, never ever use the name field in a tax_query, there is an issue with name sanitation in the WP_Tax_Query class. If you are using wp_get_post_terms(), set the fields parameter to ids to return an array of term ids

EXAMPLES

wp_get_post_terms()

$term_list = wp_get_post_terms(
    get_the_ID(), 
    'topic', 
    array(
        'fields' => 'ids'
    )
);

if (    $term_list
     && !is_wp_error( $term_list )
) {
    $args = array (
        'post_type'      => 'knowledge-base',
        'orderby'        => 'meta_value_num', 
        'meta_key'       => 'top_four_num',
        'tax_query' => array(
            array(
                'taxonomy' => 'topic',
                'terms'    => $term_list,                                       
            ),
        ),                  
    );
    // Run your custom query here
}

get_the_terms()

$terms = get_the_terms(
    get_the_ID(), 
    'topic'
);

if (    $terms
     && !is_wp_error( $terms )
) {
    $term_list = wp_list_pluck( $terms, 'term_id' );

    $args = array (
        'post_type'      => 'knowledge-base',
        'orderby'        => 'meta_value_num', 
        'meta_key'       => 'top_four_num',
        'tax_query' => array(
            array(
                'taxonomy' => 'topic',
                'terms'    => $term_list,                                       
            ),
        ),                  
    );
    // Run your custom query here
}