I am a newbie at WordPress. In my "recent posts" shortcode, I used
global $post variable, because
the_title() function was giving me page's title, not post's title. I am not exactly sure, but I thought that's because of loop inside of a loop.
Some advanced users here tell me not to use
global variable, so using
global $post variable inside my "recent posts" shortcode is good or not?