On my WordPress theme, it displays all of the categories a post is in on the homepage for the post block, I only want to display one category even if a post is under multiple categories.
i.e. Category One, Category Two, Category Three
I want it to be Category One...
This is the code that is in place at the moment:
<h2><?php the_category(', ') ?></h2>