Custom Post Type doesn’t have template content when creating programmatically in PHP but does when created in WP Admin

Custom Post Type doesn’t have template content when creating programmatically in PHP but does when created in WP Admin

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