Shortcode in a page to display custom posts which also have a shortcode in them

I had a similar problem, global $post; was returning NULL. But it works fine if I don’t use short codes.

So I found a function for getting the post id from the URI, you might be able to extend it to get more information if you need it.

Try this:

var_dump(url_to_postid($_SERVER['REQUEST_URI']));

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