Using WordPress.. I would like to redirect to a certain page on the site if the user visits an archive is_archive()
How would I go about this please? Could I add something to functions.php?
Cheers,
Steve
Using WordPress.. I would like to redirect to a certain page on the site if the user visits an archive is_archive()
How would I go about this please? Could I add something to functions.php?
Cheers,
Steve
You must be logged in to post a comment.
Using WordPress hook in
functions.php
, just paste this snippet in yourfunctions.php
There is an article here, it may help you.
wp_redirect
is just finein your archive.php template file put an if statement at the top with header location redirect if the criteria for redirection is met, perhaps using is_page(); by the sounds of it
or if it is a certain page you could do something in .htaccess
There is a plugin available to achieve this, please find it here