Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 21:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Why does text from a hidden macro appear in the search results?

Angela L_
Contributor
March 23, 2022

When a macro is hidden, any text in that macro still shows up in the Confluence search results (in the sample lines of text from the page). Why? The macro is hidden. When I look at the published page, the content of that macro doesn't appear on the page. So why does the hidden text show up in the search results? Specifically, I've tried this with the Excerpt macro and the Page Properties macro.

This makes absolutely no sense to me. 

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

0 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 23, 2022

Most of the macros that hide content on view are not there to secure information, they're just there to hide it given a context in which the page is being displayed (often who the user is, but can be other things)

Searches won't have that context, and are for finding content, no matter what.

You'll not that the hidden content appears in edit mode for everyone, and in "view source" too.

Angela L_
Contributor
March 24, 2022

What I'm really trying to do is find a way to add keywords to improve a page's performance in the search results. Is there any way to add hidden text on a page that will influence the search but not appear in the sample text that appears below the page title on the search results page? 

I know search results are influenced by title, last edit date, number of times a keyword appears on the page, and number of incoming links. We've got lots of search terms that appear on many pages, but in most cases we know that our readers are typically searching for X page when they search on a particular term. However, because X is an older or shorter page, it doesn't appear high up in the search results.

I'd like to remedy that, and I'd hoped that putting a bunch of keywords in a hidden macro would work. But that's clearly not the solution. 

TAGS
AUG Leaders

Atlassian Community Events