How to define Og Meta Tags in header using conditions [duplicate]

looks like your elseif statement isn’t correct.
try something like :

if ( is_single() || is_page() ) {
echo get_the_title();
} elseif ( is_home() || is_front_page() ) {
echo "Predefined Name";
} else {
echo wp_title;
}

http://php.net/manual/en/control-structures.elseif.php

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