WordPress.org

Ready to get started?Download WordPress

Forums

WordPress SEO by Yoast
How to remove opengrah meta on specific url ? (1 post)

  1. UsagiYojimbo
    Member
    Posted 1 year ago #

    I have issues with the SEO by Yoast opengraph feature when activating it on nextgen gallery pages (in fact, it's not possible to specify on which content I want to activate the feature).

    I hacked in the Yoast plugin ton de-activate it on my galery, by changing this function :

    public function __construct() {
    		$this->options = get_option( 'wpseo_social' );
    		$request_uri = $_SERVER['REQUEST_URI'];
    		if (!strstr($request_uri,'galery'))
    		{
    
    		add_filter( 'language_attributes', array( $this, 'add_opengraph_namespace' ) );
    
    		global $fb_ver;
    		if ( isset( $fb_ver ) ) {
    			add_filter( 'fb_meta_tags', array( $this, 'facebook_filter' ), 10, 1 );
    		} else {
    			add_action( 'wpseo_head', array( $this, 'opengraph' ) );
    		}
    		add_action( 'wpseo_head', array( $this, 'wpseo_opengraph_action' ) );
    		}
    	}

    But i would prefer not to interfer in the plugin code, and to remove tags from a remove_action or remove_filetr from the functions.php.

    Is there a workaround for such a thing ?

    http://wordpress.org/extend/plugins/wordpress-seo/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic