Display category name

  • Author
    Posts
  • vheo

    Hello, I’ve got listings category ID but how can i echo category name with this ID only?

    ihordeveloper

    Hi,

    If you’re sure that it exists, you can use this code:

    echo get_term( $category_id )->name;

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

You must be logged in to reply to this topic.

Subscribe

Sign In

Don't have an account? Register

Forgot password?

Register

Already have an account? Sign In

Forgot password?

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.