1

I would like to customize focused keyword, SEO title and meta description, but I am unable to find any clue how to do it. There is official documentation but it is sooo lacking...

I came up with this for changing title, but this is directly changing the title for a page, it won't affect meta box which is visible when creating new post.

function yoast_set_title( $title ) {
  if(is_single()) {  
    $title = 'blabla - '. get_bloginfo('name')
  }
  return $title;

}

add_filter( 'wpseo_title', 'yoast_set_title', 10, 1 );

For changing focused keyword, I didn't find anything. I would only like to set it to title of a post.

closed as off-topic by Howdy_McGee, Milo, Pieter Goosen, Mark Kaplun, TheDeadMedic Nov 27 '15 at 10:47

This question appears to be off-topic. The users who voted to close gave this specific reason:

If this question can be reworded to fit the rules in the help center, please edit the question.

0

I am not sure that you understood how the Yoast SEO plugin works, so let me explain some things.

  1. The "focus keyword" is just some feature to "test" your article, regarding how well it would/could probably work with the focus keyword. This has no effect whatsoever to the outside of your blog. It´s not like Google sees that focus keyword and responds to it.

  2. The structure of your "SEO title" can be changed in the plugin options, no need to put some crazy filters on this.

  3. Your meta description can be easily added directly in the post and is saved automatically together with your post. No need for filters here, too.

  • Thank you for replying! :) 1. I know, but I still want to have it tested for every article I have and the keyword will be the same as the title, so I would like to skip the cumbersome part of filling the field for every post. – Marko Nov 27 '15 at 11:26
  • 2. I need to insert a string into title which is different for every post (I will get it from Advanced custom fields plugin). Example, a title for post is Marigold - Sitename. Then to change it, I need to grab a custom field for its latin name (species, genus, family etc depending on the post) so it would be Marigold (Tagetes erecta) - Sitename. 3. Same for meta description. – Marko Nov 27 '15 at 11:26

Not the answer you're looking for? Browse other questions tagged or ask your own question.