[英]How can I use a short code to redirect a URL in Word Press
目前,當我 select WordPress 中的自定義菜單中的一個項目時,當我希望能夠將 URL 更改為domain.com/shop/category
時,它會將我帶到domain.com/category
鏈接設置在這里:
<h5 class="game-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h5>
這是我想將the_permalink()
重定向到諸如the_shoplink()
之類的東西,並重定向到商店 URL,而不是永久鏈接 URL。
由於主題自定義帖子類型,我無法將菜單更改為商店頁面,因此我希望將帖子重定向到the_shoplink()
我剛剛使用 php 將帖子重定向到商店頁面。
echo '<script type="text/javascript">
window.location = "http://www.google.com/"
</script>';
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.