Forums
Home / Plugins / Sidebar if Query
(@ben1000)
11 years, 1 month ago
Hey
I have this query which I’m using in the sidebar, but when I place it in a php widget, the whole sidebar disappears… The code is below and the full sidebar code is in a pastebin here http://pastebin.com/FdPrsEJN.
Any ideas?
global $wp_query; $postid = $wp_query->post->ID; if ( ! empty( get_post_meta($postid, 'TourURL', true) ) ) echo '<P>Show Link</P>'; else echo '<P>No Link</P>'; wp_reset_query();
Thanks