ucfirst()
returns a string. You need to echo
the value returned from ucfirst()
.
Furthermore, the WordPress function the_title()
prints the title directly, rather than returning it as a string. Use get_the_title()
instead.
<a href="<?php the_permalink(); ?>"><?php echo ucfirst(get_the_title());?></a>