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

hide bubble on Mobile / Remove wp-discuz on Mobile

4 Posts
3 Users
0 Reactions
1,040 Views
Posts: 14
Topic starter
(@casadeltravel)
Eminent Member
Joined: 4 years ago

Dear Forum,

I have 2 questions : 

First : Is it possible to hide wpd-bubble on mobile devices and How can i do it ?

Second : To get better pagespeed score on mobile, can i remove wpdiscuz on this device ?

Thanks

3 Replies
Asti
Posts: 7661
 Asti
Support
(@asti)
Illustrious Member
Joined: 7 years ago

Hi @casadeltravel

You should use the is_load_wpdiscuz hook and remove the comments on mobile devices. 

Reply
Posts: 1
(@makemelodies)
New Member
Joined: 4 years ago

Sample code please on how to do this? I have been trying this but it's not working:

add_filter('is_load_wpdiscuz', function ($isLoad, $post) {
if (wp_is_mobile()) {
return false;
}
return $isLoad;
}, 10,2);

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

Illustrious Member
Posts: 7661

@makemelodies,

The code works fine. We've just checked it. 

Please try on incognito mode if you're checking on mobile devices. Because mobile browsers have a hard cache, you'll not be able to see the change immediately.

Reply
Share: