This filter can be used to manipulate all SEO/social markup/schema data for an individual post when it is loaded.

Parameters (1)

$post (AIOSEO\Common\Models\Post)
The AIOSEO post object.

The object properties are subject to change and therefore not included in this documentation. For a full list of object properties, we recommend inspecting an instance of this object in a local development environment.

Example code snippet

The code snippet below can be used to dynamically change the SEO title of a specific post when the metadata is loaded.

add_filter( "aioseo_get_post", "aioseo_filter_post_data" );

function aioseo_filter_post_data( $post ) {
	if ( 10 === (int) $post->post_id ) {
		$post->title = 'Some new title here';
	return $post;