這是我的搜索代碼鏈接我的標籤上的其他網站的搜索
<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>
這是標記代碼(僅顯示文本「不鏈接」)
<?php
$posttags = get_the_tags();
if ($posttags) {
foreach($posttags as $tag) {
echo $tag->name . ' ';
}
}
?>
的代碼可以很好的適用該網站,但我必須輸入文字進行搜索。我只想把我的標籤放在搜索文字上
所以我的問題是 如何讓固定詞(我的標籤)自動放在搜索上或我必須放置標籤碼的地方,搜索結果是mytag鏈接在@ www.other-website.com/search因此用戶不必輸入?我想搜索其他網站上搜索我的標籤
我不明白你在說什麼。 – transilvlad