• Resolved Bottlelot

    (@bottlelot)


    I do not want the social media icons to show up in my notification E-Mails. Since I updated, they’ve been showing twitter and facebook links. I specifically do not want my posts or notifications shared. How do I turn them off?

    https://wordpress.org/plugins/subscribe2/

Viewing 15 replies - 1 through 15 (of 15 total)
  • mattyrob

    (@mattyrob)

    @bottlelot,

    You just need to use a little piece of code in a site specific plugin or added to your Themes functions.php file. See the API page here:

    API

    In particular the ‘s2_social_links’ filter near the end of the page. The exact code to turn the buttons off is in there.

    Thread Starter Bottlelot

    (@bottlelot)

    I see the code on the API page you linked, but I am not finding it on the site at all. Which Plugin file contains the code that needs to be modified?

    Also, just a though, on the settings page there should be an option to “Turn on Social Media Buttons” with a check box. <opinion>They should not be set on by default.</opinion>

    mattyrob

    (@mattyrob)

    @bottlelot,

    The code isn’t on you site already – as I said above you need to create a site specific plugin or add it to your Themes functions.php file.

    To create a simple plugin if you haven’t done this before try using the excellent Pluginception:
    https://wordpress.org/plugins/pluginception/

    I accept your opinion that they should be off by default but if I add features and don’t showcase them somehow then it’s likely the vast majority will never become aware of the new feature and thus will never use it. I’ve made it as easy as I can to extend or turn it off through code so as to avoid further adding to an already pretty busy Settings page.

    Thread Starter Bottlelot

    (@bottlelot)

    Understandable. Thanks!

    Thread Starter Bottlelot

    (@bottlelot)

    I’m getting error:

    Parse error: syntax error, unexpected ‘s2_social_links_off’ (T_STRING) in /home/xxxxxxx/public_html/wp-content/plugins/subscribe-2-social-off/subscribe-2-social-off.php on line 16

    Thread Starter Bottlelot

    (@bottlelot)

    `<?php
    /*
    Plugin Name: Subscribe 2 Social Off
    Plugin URI:
    Description: Turn Subscribe 2’s social icons off
    Version:
    Author:
    Author URI:
    License:
    License URI:
    */

    function s2_social_links_off() {
    return array();
    }
    add_filter(‘s2_social_links, ‘s2_social_links_off’);

    mattyrob

    (@mattyrob)

    @bottlelot,

    You are missing a quote mark in the very last line. You’ve currently got:
    add_filter('s2_social_links, 's2_social_links_off');

    And it should be:
    add_filter(‘s2_social_links’, ‘s2_social_links_off’);

    Thread Starter Bottlelot

    (@bottlelot)

    That worked. Also check your API page, because I copied and pasted from that page and it is missing the ‘ after the word links

    mattyrob

    (@mattyrob)

    @bottlelot,

    I checked the API documentation right after reviewing your code and corrected the errors on there – thanks.

    Hi Mattyrob, hope its ok to add to this thread, I’ve used the above code but some social sharing code is still being pulled through in my emails causing them to load really slowly in outlook.

    The following is still in the email source code:

    <div class=”mr_social_sharing_wrapper”>
    <!– Social Sharing Toolkit v2.2 –><span class=”mr_social_sharing”><div class=”g-plusone” data-size=”medium” data-href=”http://mysite.co.uk/?p=108″></div></span><span class=”mr_social_sharing”><script type=”IN/Share” data-url=”http://mysite.co.uk/?p=108&#8243; data-counter=”right”></script></span><span class=”mr_social_sharing”></span><span class=”mr_social_sharing”>
    <img src=”//www.linksalpha.com/images/social_share_button.png” alt=”Share” class=”linksalpha_image” />
    <script type=”text/javascript” src=”//www.linksalpha.com/social/loader_iconbox?link=http%3A%2F%2Fmysite.co.uk%2F%3Fp%3D108&id=1238852973″></script></span></div>

    @zoee,

    Those links are being created by another plugin, not Subscribe2. They are coming from social sharing Toolkit.

    You need to find another way of implementing your social links (perhaps through the code examples in the FAQ for that plugin or maybe try another plugin.

    MattyRob,

    I followed all of the instructions you gave to bottlelot and now when I send a test email, nothing happens. No email gets sent at all.

    Not sure where I would see the error message that bottlelot was seeing. I don’t get any error message, just nothing happens. When I deactivate the plugin, it starts working again. Here is what my plugin looks like:

    <?php
    /*
    Plugin Name: Subscribe 2 – Turn Off Social Media
    Plugin URI:
    Description:
    Version:
    Author:
    Author URI:
    License:
    License URI:
    */

    function s2_social_links_off(){
    return array();
    }
    add_filter(‘s2_social_links’, ‘s2_social_links_off’);

    ?>

    @dtechman

    For future reference you should have opened your own thread and linked back to this one if needed rather than resurrection an old thread.

    However, your code looks good to me, are there any errors showing in error_log files on your server?

    My apologies on the poor message board etiquette. Let me know if you want to start a new thread.

    My error log folder is empty.

    Figured out the problem. For some reason without the social links in there, it was going into my junk mail folder. Thanks for the quick response.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Social Media Icons’ is closed to new replies.