WordPress.org

Ready to get started?Download WordPress

Forums

Sidebar if Query (1 post)

  1. ben1000
    Member
    Posted 1 year 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

Topic Closed

This topic has been closed to new replies.

About this Topic