Yoast SEO
filters or configuration on some meta tags (as og:*) (1 post)

  1. NewSky
    Posted 3 years ago #


    Sometimes it may be necessary to modify the behavior of some meta tags as og:site_name.

    For example, I need to display the blog description instead his name.

    Unfortunately there is no way to change it (in the configuration or with a filter). So I had to change the code in file "frontend/class-opengraph.php":

    / **
    * Output the site name straight from the blog info.
    * /
    site_name public function () {
    $ site_name = get_bloginfo ('name');
    $ site_name = apply_filters ('wpseo_opengraph_site_name', $ site_name);

    echo "<meta property =" og: site_name "content =". esc_attr ($ site_name). '"/> \ n";

    However, on some other functions (image(), type(), ...) filters exist. So why not on site_name() function?


Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Yoast SEO
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.