Home / Admin / Dynamically Change the SEO title of a Specific Term when the Metadata is Loaded
Duplicate Snippet

Embed Snippet on Your Site

Dynamically Change the SEO title of a Specific Term when the Metadata is Loaded

This filter can be used to dynamically change the SEO title of a specific term when the metadata is loaded.

You can replace "12" with the ID of the desired term.

10+
Code Preview
php
<?php
add_filter( "aioseo_get_term", "aioseo_filter_term_data" );
function aioseo_filter_term_data( $term ) {
	if ( 12 === (int) $term->term_id ) {
		$term->title = 'Some new title here';
	}
	return $term;
}

Comments

Add a Comment