If individual article

On this page:



The if_individual_article tag is a conditional tag and always used as an opening and closing pair, like this…

    …conditional statement…

The tag will execute the contained statements if an individual article is being displayed (i.e. not an article list).

Note: article_custom always displays an article list, even when you set it to display only one article. Thus the if_individual_article tag will not work with article_custom, you’ll have to use the article tag instead.


This tag has no attributes.


Example 1: Select next-prev or older-newer navigation

<txp:article />

            <txp:prev_title />
            <txp:next_title />


Shows links to the next/previous article if the current page is an article, or shows links to the next/previous page of results if the current page is an article list.

Other tags used: link_to_prev, link_to_next, next_title, prev_title, if_article_list, older, newer.

Example 2: Use the tag with else

        <txp:site_name />
<txp:else />
        <img src="https://example.com/logo.png" alt="Logo">

Displays the site’s name when showing a single article, and a logo when not displaying a single article.

Other tags used: else, site_name.

See something wrong in this document? Outdated info, a broken link, faulty code example, or whatever? Please open an issue and we’ll investigate.