WordPress.org

Ready to get started?Download WordPress

Forums

[sociable] Remove plugin from print version (5 posts)

  1. WDarkage
    Member
    Posted 5 years ago #

    Hi,

    I was wondering if it was possible to remove Sociable from the Print-Friendly version of articles?

    Thanks in advance!

  2. akras14
    Member
    Posted 5 years ago #

    Hi,

    I had the same problem. I found the solution on the website provided bellow:

    Two excellent WordPress Plugins are WP-Print by Lester Chan and Sociable by Joost de Valk. Unfortunately, these two plugins don't play nicely together. To prevent any Sociable links/images from being printed from a WP-Print screen, first disable automatic placement of Sociable from the Sociable admin page. Next, paste the following PHP code into the Single Post file of your theme (at the location where you want sociable to appear): <?php do_shortcode('[donotprint]'); ?><?php if (function_exists('sociable_html')) { echo sociable_html(); } ?><?php do_shortcode('[/donotprint]'); ?> ...then repeat this for any other template pages where you want Sociable to appear!

    http://www.tannerhelland.com/asides/wp-print-plus-sociable-plugins/

  3. fncll
    Member
    Posted 5 years ago #

    You could also just add something like this to your stylesheet:

    @media print {
    div.sociable{
    display: none;
    }

    which will hide Sociable from all printed pages using that stylesheet.

  4. ferrous
    Member
    Posted 5 years ago #

    hi, fncll. :-)

    i tried your fix, but the print page still shows the sociable icons.

    i wondered if perhaps i'd dropped the sociable code into my pages somewhere manually so that it somehow wasn't using the sociable class but it is inside the sociable div.

    i can't figure out why your fix won't work. any ideas?

  5. modifiedcontent
    Member
    Posted 5 years ago #

    Is there still no fix for this? I really regret upgrading the Sociable plugin.

    The CSS suggestion only works partly when placed like this:

    @media print {
        #print-link {
            display: none;
        }
    }
    
    .sociable{
    	display: none;
    }

    That removes the icons from the print, but not the URLs at the bottom.

    The Akras14/tannerhelland.com solution works.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags