如何使用短代码在 Wordpress 中重定向 URL
How can I use a short code to redirect a URL in Word Press
目前,当我 select 来自 WordPress 自定义菜单的项目时,当我希望能够将 URL 更改为 [=13] 时,它会将我带到 domain.com/category
=]
此处设置link:
<h5 class="game-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h5>
这是我想将 the_permalink()
重定向到 the_shoplink()
之类的地方,然后重定向到商店 URL,而不是 permalink URL.
由于主题自定义 post 类型,我无法将菜单更改为商店页面,因此我希望将 post 重定向到 the_shoplink()
我刚刚使用 php 将 post 重定向到商店页面。
echo '<script type="text/javascript">
window.location = "http://www.google.com/"
</script>';
目前,当我 select 来自 WordPress 自定义菜单的项目时,当我希望能够将 URL 更改为 [=13] 时,它会将我带到 domain.com/category
=]
此处设置link:
<h5 class="game-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h5>
这是我想将 the_permalink()
重定向到 the_shoplink()
之类的地方,然后重定向到商店 URL,而不是 permalink URL.
由于主题自定义 post 类型,我无法将菜单更改为商店页面,因此我希望将 post 重定向到 the_shoplink()
我刚刚使用 php 将 post 重定向到商店页面。
echo '<script type="text/javascript">
window.location = "http://www.google.com/"
</script>';