I can't find it in the WP codex, but is there a way to pass a unique identifier for a custom WP_Query?
I want to identify a particular query so I can perform an action hook function on it.
$args = array(
'my_custom_id' => 'customidentifier' <-- something like this??
'category_name' => 'news',
'posts_per_page' => 3
);
$my_query = new WP_Query( $args );
Thanks in advance!
question from:https://stackoverflow.com/questions/65849916/wp-query-pass-a-unique-identifier-to-be-used-for-action-hook-later