Cunjo: The Best Free Social Share Plugin
[resolved] Disabling Social Share Buttons on Individual Posts (3 posts)

  1. cmiro
    Posted 3 years ago #

    Hi there - I would like to disable the share buttons on specific posts. Is this possible? My theme uses Custom Post types, so they are showing up on certain pages. Thanks!


  2. cunjo
    Plugin Author

    Posted 3 years ago #

    Hi, thank you for using !Share. At this stage there is not an option in the settings panel to disable inline buttons on specific pages post types. We will add this option in future releases.

    I've created a piece of code for you to use if you want until we release this feature. You can place it in functions.php so it will not brake on future updates.

    Here's the code:

    function remove_cunjoshare($content) {
    	if(is_single( '2057' )) {
    		remove_filter( 'the_content', 'cunjo_displayline');
    	return $content;
    add_filter( 'the_content', 'remove_cunjoshare', 1);

    1. Go to your wp-admin > Appearence > Editor;
    2. From the list on the left find and click on functions.php (title usually is Theme Functions);
    3. Paste the code from above in the editor, under the existent code;
    4. In the pasted function change the code is_single('2057') with the appropriate one.
    For example if you want to remove buttons from entire post type change to this 'book' == get_post_type() where book is your custom post type. If you want to remove the buttons just from few posts you can use this instead is_single( array( 17, 19, 1, 11 ) ) and change the numbers inside array with the desired post id's.

    If you have any difficulties with this send me an email at support@cunjo.com, will be glad to further assist you.

    Again, sorry for not having that option into settings at this moment.

  3. cunjo
    Plugin Author

    Posted 3 years ago #

    We will set this support topic as resolved. Thank you.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Cunjo: The Best Free Social Share Plugin
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.