How To Remove “View all posts filed under” In WordPress

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 :D

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″.

You can leave a response, or trackback from your own site.

3 Responses to “How To Remove “View all posts filed under” In WordPress”

  1. V Slicer says:

    Thanks, but which php file do you put this code into?

  2. wpcoder says:

    Thanks for this i made it into a function

Leave a Reply

You must be logged in to post a comment.

Powered by WordPress | diSolo.BIZ | diSolo.COM