Viewing 1 replies (of 1 total)
  • Hi limbo99,

    There are a few ways you can disable the buttons on certain posts or pages:

    1. By using the “Enable on” options in the plugin settings at Genesis → Simple Share.

    2. By hiding the buttons on select pages or posts in your theme’s style.css (replacing 1069 with your post ID, for example):

    .postid-1069 .share-before,
    .postid-1069 .share-after {
    	display: none;
    }

    3. By preventing the button code from running on particular pages. Adding this code to your active theme’s functions.php file would stop the buttons from appearing on a post with an ID of 1069, for example:

    add_action( 'genesis_before', 'custom_maybe_remove_share_buttons' );
    
    function custom_maybe_remove_share_buttons() {
    	global $Genesis_Simple_Share;
    
    	if ( is_single( 1069 ) ) {
    		remove_action( 'genesis_loop', array( $Genesis_Simple_Share, 'start_icon_actions' ), 5 );
    		remove_action( 'genesis_loop', array( $Genesis_Simple_Share, 'end_icon_actions' ), 15 );
    	}
    }

    You could adapt this with WordPress’s conditional tags to exclude pages and other post types if you need to.

Viewing 1 replies (of 1 total)
  • The topic ‘Exclude certain pages’ is closed to new replies.