• Resolved cachorrao

    (@cachorrao)


    I want to remove the canonical from my site’s search page but I can’t do it, does anyone know how to do this?

    Thanks

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author arnaudbroes

    (@arnaudbroes)

    Hey @cachorrao,

    You should be able to do this by adding this code snippet to your child theme’s functions.php file –

    add_filter( 'aioseo_canonical_url', function( $canonicalUrl ) {
    	if ( is_search() ) {
    		return '';
    	}
    	return $canonicalUrl;
    } );

    Thank you @arnaudbroes
    it’s work for me.. but i have a question for you. How to make the canonical url still exist, but with the correct format..

    Before i add your script, my canonical url error like this :
    xxx/journal/journal/search_page… how to make only for xxx/journal/search_page ?

    Plugin Author arnaudbroes

    (@arnaudbroes)

    Hey @lutfisland,

    That is actually a bug that we are actively working on fixing. The fix for that should be in one of the next updates.

    Thank you @arnaudbroes
    I will waiting for your update..

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Modify or Remove Canonical Created by all in one seo’ is closed to new replies.