Skip to main content
Question

Topic visible only to members?

  • February 20, 2026
  • 7 replies
  • 0 views

revote
Forum|alt.badge.img+2
  • VIP ⭐️⭐️⭐️⭐️⭐️

Is there a way to hide a specific topic from users who are not logged in? I know that I can play with category settings, but then all topics get hidden.

I don´t want to create a new category just for one topic.

Any workarounds here?

7 replies

Mithila Jayalath
  • Contributor ⭐️⭐️⭐️
  • February 20, 2026

@revote whom do you mean by visitors? Is it unregistered or not logged in users?


revote
Forum|alt.badge.img+2
  • Author
  • VIP ⭐️⭐️⭐️⭐️⭐️
  • February 20, 2026

@revote whom do you mean by visitors? Is it unregistered or not logged in users?

Good point, thanks. I edited my question.

I ment users who are not logged in.


Mithila Jayalath
  • Contributor ⭐️⭐️⭐️
  • February 20, 2026

You can hide the particular topic from a category using thrid-party scripts. Find the js-thread-id of the topic by inspecting the element and replace it in the below code.

Also add the url of topic below, so if the guest users directly use the url they will get an 403 error.

<script>
document.addEventListener('DOMContentLoaded', function() {
// Check if the data and user role exist on page load
if (window.inSidedData && window.inSidedData.user && window.inSidedData.user.role) {

// Check if the user is an administrator
if (window.inSidedData.user.role.includes('roles.guest')) {

// 1. Hide the topic card on the feed/lists
const adminStyle = document.createElement('style');
adminStyle.innerHTML = `
.js-thread-id-5634 {
display: none !important;
}
`;
document.head.appendChild(adminStyle);

// 2. Block access to the URL with the Gainsight 403 Page
if (window.location.href.includes('add url here')) {

// Stop the page from scrolling
document.body.style.overflow = 'hidden';

// Create a full-screen overlay using Gainsight's native HTML structure
const errorOverlay = document.createElement('div');
errorOverlay.style.cssText = 'position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: #ffffff; z-index: 999999; display: flex; align-items: center; justify-content: center; text-align: center;';

errorOverlay.innerHTML = `
<div class="destination_error destination_error--full-height">
<img class="destination_error_image" alt="Error 403" src="https://d3odp2r1osuwn0.cloudfront.net/2026-02-19-09-57-24-4f73b43356/dist/destination/images/errors/403.png" style="max-width: 350px; margin-bottom: 25px;">
<div>
<h2 class="destination_error_message_header bold qa-page-title"><span>Access Denied</span></h2>
<div class="destination_error_message_description">
<span>You do not have permission to view this page.</span><br><br>
<a href="/" class="btn" style="margin-top:10px;">Return to Home</a>
</div>
</div>
</div>
`;

// Append the error screen directly to the body
document.body.appendChild(errorOverlay);
}
}
}
});
</script>

 


revote
Forum|alt.badge.img+2
  • Author
  • VIP ⭐️⭐️⭐️⭐️⭐️
  • February 20, 2026

Wow. Thanks. How reliable is this ​@Mithila Jayalath? 😀

Does this hide topic from crawlers as well?


Mithila Jayalath
  • Contributor ⭐️⭐️⭐️
  • February 20, 2026

@revote this simply hide the topic from the UI for guest users. Because JavaScript runs "client-side", Gainsight's server still packages up the entire topic including the title, the original post, and all replies and sends it to the guest. The script only slaps a blindfold on the page after the data has already arrived.


mitchell.gordon
  • Helper ⭐️⭐️⭐️
  • February 20, 2026

You could create a new location for those content posts. You could build a custom page with a dynamic content widget to bring in posts from each location or a 2:1 container with a sitewide feed. Users without permissions wouldnt be able to see it in the feed and people couldnt tell the difference visually. 

If the new content location requires permissions, if this is the case it should not be indexed by google search ect.


mitchell.gordon
  • Helper ⭐️⭐️⭐️
  • February 20, 2026

People would have to subscribe to a new content location however. That is the trade off. Might require some coverage via calls with super users, CSMs and an email. Could take a bit to get true traction on it unless you also push the posts in an email to users.