How to hide labels in Confluence page using JavaScript in Specific Spaces
This guide is for informational purposes and is not eligible for support from Atlassian. If you have any questions about the information on this page, please reach out to our community at Atlassian Answers for help.
Purpose
To hide labels displayed in Confluence page of specific spaces using JavaScript.
Solution
- Find out the space key for the spaces in interest by going to Space Tools > Overview.
- Navigate to
Confluence Admin >> Custom HTML
- Click Edit
Add the following to At the end of the HEAD:
<script type="text/javascript">
AJS.toInit(function(){
if (AJS.$('meta[name=confluence-space-key]').attr("content")== '<space_key>'){
AJS.$('#labels-section').hide();
}
});
</script>
Replace the <space_key> above with the actual space key obtained from step 1
Last modified on Aug 9, 2016
Powered by Confluence and Scroll Viewport.