I'm trying to change the order of the title tag and description tag (CMS Wordpress, plugin Yoast SEO). Now in the code of the page it looks like this:

<title>something ...</title>
<meta name="description" content="something ..."/>

And I want to do this:

<meta name="description" content="something ..."/>
<title>something ...</title>

I tried this snippet in function.php, but this code does not work correctly

add_filter( 'wpseo_title', '__return_false' );

add_filter( 'wpseo_title', 'filter_wpseo_title', 90);

add_filter( 'wpseo_metadesc', '__return_false' );

add_filter( 'wpseo_metadesc', 'filter_wpseo_title', 10);
  • 1
    You can ask this in Yoast plugin's forum. – Akshat Jun 20 '18 at 20:05
  • Any reason why you want to do this? – Andy Macaulay-Brook Jun 22 '18 at 17:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.