How can I use $post
variables inside a custom plugin?
I've tried:
global $post;
echo $post->post_title;
and:
the_ID();
But none of them output any data. How can those variables work inside a custom plugin? Thanks.
How can I use $post
variables inside a custom plugin?
I've tried:
global $post;
echo $post->post_title;
and:
the_ID();
But none of them output any data. How can those variables work inside a custom plugin? Thanks.