I think in your code you must add this line for ajax acting
jQuery.ajax({
type : 'POST',
url : '<?php echo admin_url('admin-ajax.php'); ?>',
data : { action : 'vg_show_post_id', post_id: $post_id, data-id: true },
),
I think in your code you must add this line for ajax acting
jQuery.ajax({
type : 'POST',
url : '<?php echo admin_url('admin-ajax.php'); ?>',
data : { action : 'vg_show_post_id', post_id: $post_id, data-id: true },
),