Discussion forum for WP Socializer plugin

Disable floating share bar on certain pages

User avatar
martin0smith
Posts: 3
Joined: 3 years ago

Disable floating share bar on certain pages

Postby martin0smith » 3 years ago

Hi,

Awesome plug in - seriously one of the best i've used :-)

Quick question, I'd like to disable the floating share bar on certain wordpress 'pages'. Not all, just a few.

I know this feature isn't currently available via the control panel but can you show me how I can edit the code instead?

In total, I only have about 4 'pages' that I'd like to disable the floating share bar on.

Thanks in advance for any help.

Martin.
User avatar
vaakash
Site Admin
Posts: 733
Joined: 6 years ago
Location: India
Contact:

Re: Disable floating share bar on certain pages

Postby vaakash » 3 years ago

Hello,

Thanks for using my plugin. Currently there is no inbuilt option to disable the plugin in certain pages.
But you can edit the file to disable as required.

- Open includes/wpsr-floatingbar.php
- Add the following line after $flag = 0;

Code: Select all

if( is_page( array(  PAGE IDS SEPERATED BY COMMA  ) ) ) return 0;


Thank you.
User avatar
martin0smith
Posts: 3
Joined: 3 years ago

Re: Disable floating share bar on certain pages

Postby martin0smith » 3 years ago

Great, thanks.

That works a treat!