WordPress.org

Ready to get started?Download WordPress

Forums

WordPress SEO by Yoast
URL Rewriting Plugin Conflict (5 posts)

  1. Ligo George
    Member
    Posted 1 year ago #

    How to add wpseo_whitelist_permalink_vars to frontend for plugin compatibility?

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

  2. maxxsnake
    Member
    Posted 1 year ago #

    Would like to know the same. Seemingly, :

    add_filter('wpseo_whitelist_permalink_vars', 'whitelist_yoasts_redirect'));
    function whitelist_yoasts_redirect($whitelisted_extravars) {
    	$whitelisted_extravars = array('my_query_var');
    	return $whitelisted_extravars;
    }

    However, no luck.

  3. maxxsnake
    Member
    Posted 1 year ago #

    I don't know if it's improper usage or the plugin, but making the following change to class-frontend.php makes the filter I previously mentioned work properly for me. The commented line is the existing plugin code and the line below it the adjustment which makes it work properly for me.

    foreach ( $whitelisted_extravars as $get ) {
    	//if ( isset( $_GET[trim( $get )] ) ) {
    	if ( get_query_var( trim( $get ) ) ) {
    		$properurl = '';
    	}
    }
  4. Ligo George
    Member
    Posted 1 year ago #

    Is there any problem by using this.......?

  5. Ligo George
    Member
    Posted 1 year ago #

    Is it able to disable WordPress SEO for a particular page?

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic