Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author TV productions

    (@tv-productions)

    Insert the following code into the functions.php file of your theme:

    function epa_remove_author_box() {
        // Remove Starbox hook
        remove_filter('the_content', 'hookFrontcontent');
    }
    add_action('init', 'epa_remove_author_box', 99);

    Thread Starter USP Marketing

    (@us-patriot-tactical)

    Unfortunately, that didn’t work. It actually turned my entire site into a big white blank screen.

    Plugin Author TV productions

    (@tv-productions)

    Hmm, I as a bit to fast last time. Pleas try this

    function epa_remove_author_box() {
    	// Remove Starbox hook for easy photo album
    	if (class_exists ( 'ABH_Classes_ObjController' ) && $GLOBALS['post']->post_type === 'easy-photo-album') {
    		remove_filter ( 'the_content', array (
    				ABH_Classes_ObjController::getController ( 'ABH_Controllers_Frontend' ),
    				'hookFrontcontent'
    		) );
    	}
    }
    add_action ( 'wp_head', 'epa_remove_author_box' );

    Thread Starter USP Marketing

    (@us-patriot-tactical)

    I removed the original code and inserted this and it’s still white. I’ve tried deleting ALL of your code and it’s STILL white.

    Plugin Author TV productions

    (@tv-productions)

    That last part is weird. Looks like some PHP error somewhere. Add the WP_DEBUG constant to wp-config.php to get the error message. More info on WP_DEBUG, see https://codex.www.ads-software.com/WP_DEBUG
    (Remove the constant after the website is up and running again.)

    When you’ve your site up and running again, you better use (only) this code:

    function epa_maybe_author_box($content) {
    	// if this is an included photo album, remove author box
    	if (class_exists ( 'ABH_Classes_ObjController' )) {
    		global $EPA_DOING_SHORTCODE;
    		if ($EPA_DOING_SHORTCODE == true) {
    			remove_filter ( 'the_content', array (
    			ABH_Classes_ObjController::getController ( 'ABH_Controllers_Frontend' ),
    			'hookFrontcontent'
    					) );
    		}
    	}
    	return $content;
    }
    add_filter ( 'the_content', 'epa_maybe_author_box', 1 );

    This is neater and better tested

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Bio and Sharing Buttons are Doubled?’ is closed to new replies.