functions.php: adding is_main_query() to the condition al in the  pre-get-posts action