Sidebar if Query
-
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 https://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
- The topic ‘Sidebar if Query’ is closed to new replies.