Hide Related Articles section from a specific article

If you're using Related Articles, there might be specific articles where you don't want the section to display. For example, perhaps this article contains your company W9 and everything it's suggesting as related is product documentation.

For this scenario, create a snippet that will hide the Related Articles section and then add that snippet to the specific articles where you want to hide the section.

First, create the snippet:

  1. In the left navigation, go to Snippets. The Snippets page opens.
  2. Select + Create New Snippet.
  3. Enter a Snippet Name, like "Hide Related Articles."
  4. Enter a Snippet Description, like "Use this snippet in articles and custom content categories to hide the Related Articles section."
  5. Select the Snippet Content dropdown to switch to Code Editor:
    Gif showing the Snippet Content toggle to Code Editor. Hover over to play.
  6. Copy the code below and paste it into the snippet's Code Editor:
    <style>
      /* Hide related articles */
      .ko-related-articles {
        display:none;
      }
    </style>
  7. Select Create.

Now that your snippet exists, any of your authors can add it to an article using the Insert snippet option.

New to snippets?
Review Create a snippet instructions for more detailed instructions on creating them.