How to get a custom taxonomy names, description and Images in wordpress?

In general we are in used of cresting the taxonomy like categories, Countries or another_category. That could be the any name.

To create a taxonomy Click HERE

Okay if our taxonomy is ready then we need to add the categories under it like i have created you can see in the below screenshot:

categories-developer-gang-wordpress

I am showing the taxonomy CATEGORIES which is by default under post section. you can use it in any custom post type.
wll work same.

In the screenshot you can see in the right side categories added names: Ajax, Blog, Ftp and java etc. all are categories under One taxonomy.

IN the left side you can see to add new category there is a Name option and Description option.
But we need as well as the Image Option. For this i am using the ADVANCED CUSTOM FIELDS(ACF) Plugin.

By this plugin we can add the image field for the taxonomy name Categories.

See screenshot:

12

Update it and go to the categories section. you will see there will be option for a image section

as in the screenshot:

13

Now we have all three options that is Name, Description and Image.

Add all this and to show in the Frontend. Go to the files where you want to show. add the below code.

Yes By using the above code you will be able to display the name of all categories as well as description and Images.
For the image code that i have above used: $image = get_field('image_for_taxonomy', 'categories_'.$category->term_id); IN this image_for_taxonomy is the name that is specified in the custom field. Use the name whatever you take.

And in first line where type is mentioned you can use your custom post type name if you are using in the custom post type. and replace taxonomy name with your taxonomy name.

Thats it..!!!

Ankush chhabra

My name is Ankush Chhabra and I’m a 28 years old web developer and blogger.I have 5 years of experience in this field.