Running PHP in a post URL?
I’m trying to figure out how to run php inside a url in a post. I have sucessfully run PHP in a post with the help of:
But I cannot run PHP inside of a URL.
For example, if I were to put this in one of my posts:
<a href="site.com?x=<?php echo $_GET['x']; ?>&pg=1">Link Here</a>
It malfunctions and messes up both the url and surrounding code.
I have tried it with the plugin:
<a href="site.com?x=<phpcode>echo $_GET['x'];</phpcode>&pg=1">Link Here</a>
And that does not work either.
It is not the php command that is causing the trouble (I have used the exact code outside of the posts fine), it is because WP is doing something to the posts and I can’t figure out how to remedy it. Both of the popular PHP plugins for WP did not work for this.
Otherwise the plugins work fine, but when you throw a URL in there something happens.
I would appreciate any insight on this issue.
- The topic ‘Running PHP in a post URL?’ is closed to new replies.