Q:

Selected Categories are not showing with channel content In Expression Engine

I have created a Channel named "news" with some fields and also create a category group name "national" with category "sports, business" and enable this category for channel "news".
And also add content for "news" channel and into category section select only "Sports" category.
Now i want to show only that selected category "Sports" into front end along with other content and i am using the below code.
{exp:channel:entries channel="news" limit="1"}
    <h2>{title}</h2>
    <p>{body}</p>
    {exp:channel:categories}
        {category_name}
    {/exp:channel:categories}
{/exp:channel:entries}

This code is working for {title} and {body} section, but for {category_name} it showing both the categories Sports and Business. But I just want to display only the selected one means Sports.
So please can anyone tell me What can I do to get only the selected category (Sports) for that particular channel content ??

A:

Use the {categories}{/categories} var pair instead of the channel:categories tag. It automatically displays just the categories selected for the entry.

