wp_list_categories() will add “View all posts filed under” in front of category name as title attribute. My clients asked me to remove those prefix because it looked funny ![]()
Here is a simple script to do it and keep your category title attribute clean without touching WordPress core file.
$categories = wp_list_categories('echo=0');
$categories = preg_replace('/View all posts filed under /','',$categories);
echo $categories;
That’s it. Of course you can add function arguments on wp_list_categories but don’t forget to set “echo=0″.
Posted in
Tags: 

Thanks, but which php file do you put this code into?
You just need to replace the code from wp_list_categories() to the codes above.
Thanks for this i made it into a function