<?php
add_filter( 'aioseo_canonical_url', 'aioseo_filter_canonical_url' );
function aioseo_filter_canonical_url( $url ) {
if ( is_singular() ) {
return '';
}
return $url;