In this tutorial we will explore the relationship between an article and its category and demonstrate that both must be published for the article to appear on the website.

Prerequisites

Setup

Create a Category

  1. Log in to Joomla backend and navigate to the Home Dashboard.
  2. In the Administrator Menu, click Content > Categories.
  3. Click New. Result: A new-category form appears.
    • Title: World News
  4. Note that the Status field defaults to Published.
  5. Click Save & Close.

Create Two Articles

  1. In the Administrator Menu, click Content > Articles.
  2. Click New. Result: A new-article form appears.
    • Title: Weekend Storm Watch: Heavy Rain Expected
    • Category: Uncategorised (the default).
    • Featured: Yes
  3. Click Save & New.
    • Title: Trade Summit Ends in New Agreement
    • Category: World News
    • Featured: Yes
  4. Save & Close

Steps

Unpublishing an Article

  1. View the site. Result: Both articles appear on the homepage as featured articles. Note: The article details show the category, and the two articles are in different categories.
  2. Return to the backend and click Content > Articles.
  3. Click Weekend Storm Watch: Heavy Rain Expected to edit the article.
    • Set Status to Unpublished, then click Save & Close.
  4. View the site and refresh the homepage. Result: Weekend Storm Watch: Heavy Rain Expected no longer appears. Note: Articles must be published to appear on the website.
  5. Return to the backend and view the article list.
    • Observe that the Status icon for Weekend Storm Watch: Heavy Rain Expected is a gray X (unpublished), while the icon for Trade Summit Ends in New Agreement is a green check (published).
    • Hover over the icons to read the popup messages.
    • Click the gray icon to publish Weekend Storm Watch: Heavy Rain Expected again. Note: Articles can be published or unpublished from the article list or by editing the article.

      Status icon in the articles list

  6. Confirm that both articles again appear on the homepage (refresh if necessary).

Unpublishing a Category

  1. Return to the backend and click Content > Categories.
    • Observe that categories have a status icon similar to articles.
    • Hover over the icon to read the popup message.
    • Unpublish the World News category by clicking its icon.
  2. View the site and refresh the homepage. Result: The Trade Summit Ends in New Agreement article no longer appears. Note: An article and its category must both be published for the article to appear on the website.
  3. In the backend, view the article list (Content > Articles).
  4. Note the status icon for Trade Summit Ends in New Agreement is now a gray dash.
    • Hover over the icon to view the popup message.

      Status icon when category is unpublished

    • In the article details below the title, observe that the category World News appears with an (unpublished) indicator.
  5. Edit the article and observe that World News is selected in the Category dropdown, but appears in brackets, indicating that the category is unpublished.
  6. Close the article without saving.
  7. Return to the category list and click World News to edit it.
    • Set Status to Published, then click Save & Close.
  8. View the site, refresh the homepage, and verify that both articles appear.

Concepts

Articles must have a category. It is a required field, and it is not possible to create an article without one. A fresh Joomla installation includes a default category called Uncategorised.

An article and its category must both be published for the article to appear on the website.

The status icon in the article and category lists indicates the publication status. Clicking the icon toggles the status.

When developing a new article or category, it may be helpful to keep it unpublished to avoid it being displayed on the website until it's ready.

Unpublishing a category prevents all articles in that category from being displayed on the website. Take care when unpublishing active categories.

The article list shows the category for each article, and unpublished categories are noted there — this is how articles with unpublished categories can be identified.

When editing an article, an unpublished category appears in brackets in the Category dropdown.