WordPress.org

Ready to get started?Download WordPress

Forums

Really simple Facebook Twitter share buttons
[resolved] how to exclude from given pages (6 posts)

  1. chestel
    Member
    Posted 3 years ago #

    Great plugin. Much cleaner than some of the others I've tried.

    Without doing anything particularly challenging I've come up against the problem where some pages display two sets of buttons because of imbedded content e.g. I use the Featured Content Slider which just summarises featured pages - the Facebook+Twitter buttons show up inside the slider as well as on the master page.

    Another example is if I use the Secondary HTML plugin, it counts as separate page so F+T show up twice.

    Can anyone think of a hack I can an employ to avoid this or is there a preview of the code for the button hiding tag mentioned as upcoming in the Other Comments section of the Plugin doc?

    http://wordpress.org/extend/plugins/really-simple-facebook-twitter-share-buttons/

  2. whiletrue
    Member
    Plugin Author

    Posted 3 years ago #

    Hi Chestel,
    version 1.4.5 of the plugin is out, including the way to exclude buttons from given posts via a Custom Field.

    If you want to hide the share buttons inside selected posts, set the "really_simple_share_disable" custom field with value "yes".

    Please let us know if it fits your needs. We're still working on odd interactions between plugins.

  3. chestel
    Member
    Posted 3 years ago #

    Wow - thanks for the speedy update.

    really_simple_share_disable works well with pages where a second page sample or excerpt is embedded, as the parent page can just have this added.

    Where a page has more than one content area (e.g. using Secondary HTML plugin) really_simple_share_disable applies to both areas, making the button's appearance all or nothing. I'll look for a way to target this.

  4. chestel
    Member
    Posted 3 years ago #

    Hi whiletrue,

    I'm sure you'll come up with something more elegant.

    For the time being, I putting an override where the value of really_simple_share_disable is ignored if the really_simple_share was called with the shortcode.

    So I can disable the auto insertion for pages where there are collisions but still insert really_simple_share manually with the shortcode.

    // IF THE "DISABLE" CUSTOM FIELD IS FOUND, BLOCK EXECUTION
    	// unless the shortcode was used in which case assume the disable
    	// should be overridden, allowing us to disable general settings for a page
    	// but insert buttons in a particular content area
    	$custom_field_disable = get_post_custom_values('really_simple_share_disable');
    	if ($custom_field_disable[0]=='yes' and $filter!='shortcode') {
    		return $content;
    	}
  5. whiletrue
    Member
    Plugin Author

    Posted 3 years ago #

    Hi Chestel,
    the override you proposed is clean and good: we included it in the new version of the plugin.

    Thanks for your support!

  6. paulohsms
    Member
    Posted 3 years ago #

    That issue were mine too. And it is solved thanks to your information.
    Cheers !!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic