How can I get the current Question Custom Post Type ID ?
Hello,
get_the_ID()
not working because you are trying social shortcode outside loop. instead try get_question_id()
Rahul Aryan commented on answer

Rahul Aryan commented
There is a syntax error. it should be like:
echo do_shortcode('[social_warfare post_id=' . $id . ']');
get_question_id(); does not seem to work neither.
What I’ve done :
if(function_exists(‘social_warfare’)){
$id = get_question_id();
echo do_shortcode(‘[social_warfare post_id=”$id”]’);
}
add_action( ‘ap_before’, ‘social_warfare’ );