Search Custom Post Types in WordPress

Yes I did:

I needed

<?php if($post->post_type == 'customposttype' ){ ?>

On the next line. Several sources I’ve seen omit that.

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