How to insert “get_template_part()” based on Category ID?

I think the best way is hooking to the filter template_include https://developer.wordpress.org/reference/hooks/template_include/

You’ll find some exmple at https://markjaquith.wordpress.com/2014/02/19/template_redirect-is-not-for-loading-templates/

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