Know the post ID of a custom post type from inside the poll
-
Hello,
I like your poll very much, great work. I have a question, i need to know from which post the people is voting but when i try to use:
global $post;
$id = $post->ID; —- returns nullglobal $wp_query
$id =$wp_query->get_queried_object_id(); –return 0global $wp_query;
echo $wp_query->post->ID; –return nullI’m, calling those functions from inside the “register_vote” function.
I would apreciate your help. Thanks in advance.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Know the post ID of a custom post type from inside the poll’ is closed to new replies.