Check if post/page has gallery?

try :

if (strpos($post->post_content,'[gallery') === false){
  $gallery = 0;
}else{
  $gallery = 1;
}

Leave a Comment

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