Using pre_get_posts to target a query in the sidebar

I think you can achieve this by adding a query var. And then you can use something in pre_get_posts like this:

if ( get_query_var( 'your_var' ) ) {
    // do something
}

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)