Yoast SEO
[Plugin: WordPress SEO by Yoast] Dynamic Page Title (1 post)

  1. mcserban
    Posted 3 years ago #

    I am trying to change page title and meta description with filters, to include dynamic content.

    I don't know how to pass a variable in filter. Can anyone help me, please?

    I have this script:

    $var_url = 'euro';

    function yoast_add_title( $str ) {

    return $var_url.$str; }

    add_filter( 'wpseo_title', 'yoast_add_title');

    The string from $var_url - is not showing up in title.


Topic Closed

This topic has been closed to new replies.

About this Plugin

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

About this Topic