Hide custom text from specific groups

To display text only for specific user groups, refer to the below snippet and insert into a custom homepage item:

In this example, we are using groupIDĀ 999 which is the Guest Group.

    if(activeInfo.user.groupID !== 999){
        var cssSettings = `
            .hidden-for-non-guest {
                display: none;
<style id="guest-css"></style>
<div class="hidden-for-non-guest">
    <h1>You're a guest.  Please log in!</h1>
This is text everyone sees.

Steps to reproduce

A user who is logged in

A user who is not logged in