Ready to get started?Download WordPress


WP Socializer
Disable on Custom Post Types (4 posts)

  1. Atomwhale
    Posted 1 year ago #

    Hi, I have a theme that has multiple post types and i would like to know of a method of disabling the display of the buttons only on the custom post types. Currently the displaying options has a generic "show on posts" option. Since that is checked it automatically displays on all custom post types which is not needed for the current site. Appreciate it if you could post a work around for it or an update!



  2. Bozz
    Posted 1 year ago #

    I'm also looking for this information. Thanks!

  3. FaceLord
    Posted 1 year ago #

    I found a solution!

    I was able to prevent the scripts and css from loading in, and prevent markup from being written to the page by adding these lines of code to the functions.php of theme that my site switches to when displaying mobile pages.

    You'll probably need to figure out a way to make these lines only apply to a specific post type. My situation was a bit simpler, since I could just put it in the theme that applied.

    remove_action('wp_footer', 'wpsr_floatingbts_output');
    remove_action('wp_head', 'wpsr_scripts_adder');
    remove_action('wp_footer', 'wpsr_scripts_adder');
    remove_action('wp_footer', 'wpsr_footer');
    remove_filter('the_content', array($wpsr_content_op, 'output'));
    remove_filter('the_excerpt', array($wpsr_excerpt_op, 'output'));
  4. Bozz
    Posted 1 year ago #

    Nice! Thanks for sharing this. I'll try this out on an upcoming project with some template logic and report back.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic