'post', 'meta_key' => 'barcode', 'meta_value' => $_REQUEST['code'], 'meta_compare' => '=' ) ); if (have_posts()) : while (have_posts()) : the_post(); $url = get_permalink() ; wp_redirect($url); endwhile; else : echo '

No entry for game '.$_REQUEST["code"].' exists yet

'; endif; else: echo "Click here to configure your copy of scan2shop automatically"; endif; ?>