[wp-hackers] Hide category
scribu
scribu at gmail.com
Wed Dec 3 11:26:36 GMT 2008
On Tue, Dec 2, 2008 at 6:15 PM, Dan Gayle <dangayle at gmail.com> wrote:
> Here's an example of what I am talking about:
> LOOP
> The post headline
> The the post text
> The the post author
> The the post date
> The post's categories: News, Featured News, Google News <<<--- Need
> to hide just this
> END LOOP
>
> I need to hide the Google News category from the display on the blog,
> without compromising the rest of the post. Thanks for everyone's patience :)
>
> Dan
This should work (not tested):
Instead of <?php the_category ?>
put
<?php
ob_start();
the_category();
$categories = ob_get_clean();
str_replace('GoogleNews', '' , $categories);
echo $categories;
?>
--
http://scribu.net
More information about the wp-hackers
mailing list