How to hide the broken dialog when no plans are configured

So I wanted to hide the “Ready for Unlimited Access” prompt shown to the subscribers to my blog.

For more context, check out my earlier question on the forum: How to remove “Ready for unlimited access?” dialog for subscribers? which was archived, and I cannot reply to it. Hence posting the solution in a separate thread.

I made it work with the following JavaScript snippet, which works as expected. It hides the prompt only for the registered members, while leaving the subscription prompt for new readers intact.

<script type="text/javascript">
    document.addEventListener("DOMContentLoaded", ready);
    function ready() {
        let member_btn = document.querySelector(".gh-subscribe-btn");
        if(member_btn) {
            let subscribe_modal = document.querySelector(".gh-subscribe");
            subscribe_modal.remove();
        }
    }
</script>

Note:

This solution is for the Digest theme. But I guess you can use a similar approach for other themes, too. Simply check for the presence of the subscribe button for unlimited access. If present, hide its parent. That way you won’t hide the subscribe prompt shown to the new readers.

Hope this helps.

Akshay


Also see similar questions:

4 Likes

Thanks a lot for providing this solution. I use the theme Journal and just needed to modify “subscribe” to “signup” to catch the right upgrade modal. Cheers!

2 Likes

Nice! I am glad it helped.

1 Like

Just to say I had the same issue for Headline, and copying your code exactly into the site footer fixed the issue. Thank you!

2 Likes