Reputation: 51
im having an problem, currently im using a code to alter page content.
<?php
if (isset($_GET['ad']) && $_GET['ad'] == 1)
{
echo "";
}
else {
echo '<div class="ad-area"><p>This is the ad, click here</p> </div>';
}
?>
But now I face a problem, since I need to display another URL and it echos from wordpress custom field.
<input type="hidden" name="link" value="<?php echo $linkk; ?>?kw=<?php echo $_GET['kw']; ?>" />
What I would like to see is that if url has
ad=1
inside it,
$linkk would be $linkk2
, but im unsure how to do it, cause echoing just displays the code, cause its server side. Since its a page template and the URLs change, then I cant just insert them into the code.
What to do?
Thanks, M
Upvotes: 0
Views: 80
Reputation: 324640
Do you mean like this?
echo '<input type="hidden" name="link" value="'.$linkk.'?kw='.$_GET['kw'].'" />';
Upvotes: 3