Get category name using category slug

Support Forums Programming and Development WordPress Get category name using category slug

This topic contains 1 reply, has 1 voice, and was last updated by  gnana sekaran 2 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #1118

    gnana sekaran
    Participant

    how to get category name in wp

    #1122

    gnana sekaran
    Participant

    $category_slug // cat slug name
    $catObj = get_category_by_slug($category_slug);
    $catName = $catObj->name; //get cat name

Viewing 2 posts - 1 through 2 (of 2 total)

You must Login/Register to reply to this topic.