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);

Use Contact Form 7 to collect business leads and enquiries? I created Storage for Contact Form 7 plugin which stores them safely in WordPress database.

Get it Now →

Leave a Reply