get post id for Sidebar widget
I am about to purchase classipress and have managed to test a widget I developed on a colleagues version. I am having a problem getting the post id from the Ad Sidebar position. It is giving me the incorrect id. The code works fine everywhere else except when I am viewing an ad and the widget is in the Ad Sidebar.
I have tried everything,
global $post;
global $wp_query;
$thePostID = $wp_query->post->ID;
$id = get_the_id();
I even have the same problem when I use your custom hook
add_action( 'appthemes_after_sidebar_widgets', 'insert_twitter_link' );
Is it possible to call the post id from the Ad Sidebar? I don't expect the answer until I purchase, but I would need to know that it is possible before I go ahead.
Thanks, Keith