How get category title anywhere in your wordpress website?


Hello Everyone!

If you want to retrieve the name of a category from its ID, then just use my code anywhere in your theme files where you want to show the category title.

<?php 
echo get_cat_name(1); //here 1 is the cat id
?> 

Enjoy Code! and share my blog with your friends.

Advertisements

Sr. Software Engineer

Tagged with: , , ,
Posted in Wordpress
One comment on “How get category title anywhere in your wordpress website?
  1. Xanax says:

    Thanks for sharing your thouvhts on outlet stores.
    Regards

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: