-
Recently you help me disable the plugin on a specific page and add a snippet to create page titles dynamically based on on page country filtering.
Here’s the code:
/** * Filter to change the page title. * * @param string $title */ add_filter( 'rank_math/frontend/title', function( $title ) { if( is_page( '1161' ) && !empty($_GET['country'])) { $cc = $_GET['country']; $countries = New WC_Countries(); $all_countries = $countries->get_countries(); return 'Emerging sustainable designers in ' . $all_countries[$cc] . ' - Rize'; } return $title; });
What I’m wondering is whether it’s also possible to reuse the same or a tweaked version of this to also add dynamic meta descriptions too?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
The ticket ‘Dynamic meta data’ is closed to new replies.