The effects of alcohol on sustanon 250 leucine for – real weight loss & bodybuilding benefits?
Disable subscriptio...
 
Share:
Notifications
Clear all

Limited Support

Our support team is currently on holiday from December 25, 2025 to January 7, 2026, and replies may be delayed during this period.

We appreciate your patience and understanding while our team is away. Thank you for being part of the wpDiscuz community!

Merry Christmas and Happy Holidays! πŸŽ„

[Solved] Disable subscription bar for guests

12 Posts
3 Users
1 Reactions
1,569 Views
Posts: 12
Topic starter
(@jharries)
Eminent Member
Joined: 5 years ago
[#1371]

Good day,

Β 

We run a membership site www.morganscloud.com

I see that I can disable commenting for guests, which is great.

But I can't see a way to disable the subscription bar for guests only, but leave it there for logged in users.

Maybe this is in one of the premium add ons? If so happy to buy it.

Am I missing something, and if not, is there a way I could make this work?

Maybe enclose the subscribe bar in the template in a php function that tested for logged in?

Thanks

John


11 Replies
Posts: 12
Topic starter
(@jharries)
Eminent Member
Joined: 5 years ago

Hi Again

Just took a look at the templates and it looks like I need to edit the comment-form.php and wrap the following code in an if statement so not to show if the user is not logged in:

<div class="wpd-sbs-toggle">
<i class="far fa-envelope"></i> <span class="wpd-sbs-title"><?php echo esc_html($wpdiscuz->options->phrases["wc_subscribe_anchor"]); ?></span> <i class="fas fa-caret-down"></i>
</div>

Β 

Is it OK to copy and edit comment-form.php in the same way as you document here: https://wpdiscuz.com/docs/wpdiscuz-documentation/customization/custom-template-and-style/

Β 

Thanks

John


Posts: 12
Topic starter
(@jharries)
Eminent Member
Joined: 5 years ago

Hi Again,

I thought I had it with this filter:Β 

https://wpdiscuz.com/docs/codex/filters/wpdiscuz_before_subscription_added/

But the field is still visible Β although I do get an error code and the sub is blocked.

Still, not quite what I was looking for.

All suggestions gratefully received.

John


1 Reply
Asti
 Asti
Support
(@asti)
Joined: 8 years ago

Illustrious Member
Posts: 8205

@jharries,

You can hide the subscription bar for guests using this CSS code provided in this post: https://wpdiscuz.com/community/postid/3065/


Posts: 12
Topic starter
(@jharries)
Eminent Member
Joined: 5 years ago

Hi Asti,

Β 

That's a great idea, thanks. I did not know that you could test in CSS for a logged in user, so that's a great learning for me too, double thank you

One thought, I think I'm right that spammers could still find the the field and fill it in so maybe I should also disable it for non logged in users using the filter above? Or will that break something else?

Thanks

John


1 Reply
Asti
 Asti
Support
(@asti)
Joined: 8 years ago

Illustrious Member
Posts: 8205

@jharries,

I may also suggest you remove the element via JS code:

jQuery( "body:not(.logged-in) .wpd-sbs-toggle" ).hide();

In this case, it'll not be visible in inspect element section.Β 

This article should be helpful for you: https://medium.com/better-programming/how-to-add-javascript-to-wordpress-a4fdc7618a21


Posts: 12
Topic starter
(@jharries)
Eminent Member
Joined: 5 years ago

Hi Asti,

Even better, thanks. That will I think stop the spammers cold?

John


1 Reply
Asti
 Asti
Support
(@asti)
Joined: 8 years ago

Illustrious Member
Posts: 8205

@jharries,

Yes, this should. I may also suggest you read this article: https://www.wpexplorer.com/prevent-wordpress-spam/

It also should be helpful for you.Β 


Posts: 1
(@martin___)
New Member
Joined: 3 years ago

Feature request. Would it be possible that you add this option to the general settings of the plugin? In the "Subscription and User Following section"?Β  Besides i restricted guests from commenting but they still see the option to subscripe to "messages to their own comments" .Β 


2 Replies
Asti
 Asti
Support
(@asti)
Joined: 8 years ago

Illustrious Member
Posts: 8205

I'll aks the developers and get back to you soon.Β 


Asti
 Asti
Support
(@asti)
Joined: 8 years ago

Illustrious Member
Posts: 8205

Hi @martin___,

The feature will be added in the next version of the wpDiscuz plugin (no ETA). I'll update this topic once it'll be ready.Β 


Asti
Posts: 8205
 Asti
Support
(@asti)
Illustrious Member
Joined: 8 years ago

Hi,

We want to let you know that the new options are added in the latest version of the wpDiscuz plugin (v. 7.6.1).Β 

Please update the plugin, then goΒ to the Dashboard > wpDiscuz > Forms admin page, edit the current form (if nothing is changed it's called "Default Form") and you'll see the newly added two options:Β 

  1. Enable subscription bar for guests
  2. Enable subscription bar for roles

Find out the news about the wpDiscuz latest version here:Β  https://wpdiscuz.com/community/news/wpdiscuz-7-6-1-is-released/#post-20898


Share: