aioseo_local_business_get_locations_args

Purpose

This filter can be used to change the locations query.

Arguments (1)

  1. $args (array) – WP_Query accepted arguments.

Example code snippet

The code snippet below is just an example of how this filter can be used. In the example below the query arguments are changed to include ‘future’ locations.

add_filter( 'aioseo_local_business_get_locations_args', 'aioseo_change_local_business_get_locations_args' );

function aioseo_change_local_business_get_locations_args( $args ) {
	$args['post_status'] = [ 'publish', 'future' ];

	return $args;
}