612-293-8629 HELLO@THEMIGHTYMO.COM

Today I wanted to display a category title outside of The Loop using the category’s id in WordPress.  Many thanks to Eric Johnson for providing the solution:

<?php $categoryTitle = get_the_category_by_id(105); ?>
<?php echo $categoryTitle; ?>

Note: “105” is the id of the category.

PHONE, EMAIL, TEXT

We love to communicate: phone, email, text, Facebook, Twitter, LinkedIn, you name it.

LOCATIONS

PAYMENTS ACCEPTED

Call Now

Enroll in Our Free Beginner WordPress Class - delivered to your Email Inbox!

Become a WordPress superstar for FREE in only minutes a day!  Our free Beginner WordPress Email Class will be delivered to your inbox!

Learn More 

You Have Successfully Enrolled! Prepare For Amazing!