• How would I include the value of queries in my link into my posts? For example, if the link is https://www.domain.com/?id=12345 I’d like to be able to put “12345” into my posts. Right now I am using exec-php plugin and I place
    code:

    <?php $id = strip_tags($_REQUEST['id']);?>

    in the header.php but when I try to echo $id, it comes out empty. It’s like it’s not passed into the posts and someone mentioned it might be a scope problem so I tried placing global $id into the post as well but no go. So an example post would be like this:

    blah blah blah come check out the product <a href="https://www.domain.com/?id=<?php echo $id;?>">here!</a>

    This is for a rss feed for my affiliates for a product I’m promoting, I want to be able to pass their affiliate code into the blog so they can just use this feed for whatever purpose they need.

  • The topic ‘Show query strings in post?’ is closed to new replies.