I’ve read lots of the threads for passing variables…so feel like I’ve tried a lot of different methods. But. Basically, I’m trying to pass a variable to an iframe that loads single.php, for displaying individual posts.
In category-5.php I have:
<a href="?p=<?php the_ID(); ?>?wh=1">link to post</a>
In single.php I have:
$wh = $_GET['wh']; echo "wh=" . $wh;
Doesn’t work though. What am I doing wrong here? Any help greatly appreciated.
- The topic ‘Pass custom var in url’ is closed to new replies.