How to Remove “View all posts filed under” Prefix from Link Title Attribute in Category Widget

Remove link prefix from categories widget in WordPress

add_filter( 'the_category', 'remove_category_link_prefix' );
add_filter( 'wp_list_categories', 'remove_category_link_prefix' );

function remove_category_link_prefix($output) {
        $replace = array( 
                'View all posts in ',
                'View all posts filed under ' 
        );

        return str_replace( $replace, '', $output);
}

Never lose a single business lead or enquiry again! Get my latest plugin Storage for Contact Form 7 now!

Buy now for only $19 →

Leave a Reply