How to make global post work with custom post type?

By default get_posts() uses a default post type of post.

If you want to select from a CPT then you need this:

$myposts = get_posts('numberposts=4&offset=1&category=3,4&post_type=YOUr_CPT_HERE');

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