This is my code
<?php
$usersfollowing=1;
echo($usersfollowing);
add_action( 'elementor/query/my_custom_filter', function( $query ) {
$query->set( 'author', '1' );
} );
?>
It is working fine when I give value '1' after the 'author'. I want to use $usersfollowing to pass value as 1. When I do $query->set( 'author', $usersfollowing )
it does not work.
I want to use $usersfollowing to pass variable value.