Child Pages and Custom Taxonomies

You can grab the ID’s of all children and set the post__in argument for your tax query:

$child_ids = $wpdb->get_col(
    "SELECT ID FROM $wpdb->posts WHERE post_parent = $post->ID AND post_type="page" ORDER BY menu_order"
);

$args = array(
    'post__in' => $child_ids, // Only retrieve taxonomy posts that are children of this page
    'tax_query' => array(
        array(
            'taxonomy' => 'top5',
            'field' => 'name',
            'terms' => $post->post_title
        ),
    ),
);

Alternatively, if you only want posts that were not children of the page, you can just use the argument 'post_parent__not_in' => array( $post->ID ).

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)