aioseo_get_post_id

Purpose

This filter can be used to change the Post ID being processed by AIOSEO.

Arguments (1)

  1. $postId (integer) – The Post ID.

Example code snippet

add_filter( 'aioseo_get_post_id', 'aioseo_change_post_id' );
function aioseo_change_post_id( $postId ) {
	if( is_post_type_archive( 'product' ) ) {
		$postId = 123;
	}

	return $postId;
}