add_action ‘init’ from inside a class for custom post types

You only create an instance of your class on admin requests, so your CPT doesn’t exist on front end requests. Instead of:

if( is_admin() )
    $cpt = new CPT('cpt_child');

create the instance on all requests:

$cpt = new CPT('cpt_child');

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