Custom metaboxes not saving after switching themes

You don’t appear to be setting meta_box_nonce anywhere in your code. As your cd_meta_box_save function returns if the nonce isn’t set, your fields will not be saved.

See the codex for more on nonces.

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