This is my search code
<div id="search">
<form method="get" action="http://www.other-website.com/search">
<input type="hidden" name="f" value="">
<input type="text" placeholder="Temukan informasi, komunitas & produk yang kamu cari disini" accesskey="s" name="q">
<input type="submit" value="Search">
</form>
</div>
This is the tag code (display only text “do not link”)
<?php
$posttags = get_the_tags();
if ($posttags) {
foreach($posttags as $tag) {
echo $tag->name . ' ';
}
}
?>
The code can apply well on the website, but I have to enter text to the search. I just want to place my tag on that search text
so my question is
How to make fixed word(my tag) automatically placed on search or where I must place the tag code, the search result is mytag linked on @www.other-website.com/search so user do not have to type? I want to search my tag on other website search
after a night try & errorr, I think I’ve found it, and here is the details of the code :
that can direct to the other website search xxx.othersite.xxx/search/my-tag
but now other problem show that if user clicks on that link, it opened at the same page.
I’ve tried
How to open the link to the new tab using onClick on that code?