Currently, when I select an item from a custom menu in WordPress, it takes me to domain.com/category
when I want to be able to change the URL to domain.com/shop/category
The link is set here:
<h5 class="game-title"><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h5>
Here is where I want to redirect the the_permalink()
to something such as the_shoplink()
and redirect to the shop URL, not the permalink URL.
I can't change the menu to be the shop page because of the themes custom post type so I'm looking to redirect the post to the_shoplink()
CodePudding user response:
I just redirected the post to the shop page using php.
echo '<script type="text/javascript">
window.location = "http://www.google.com/"
</script>';