I want the page to be redirected automatically to a specific url.
The url is changing so I guess maybe an anchor function might work.
I am trying to do this on WordPress so a how-to & where-to quick detail will help a lot.
If this is my redirect code
<meta http-equiv="Refresh" content="0; url=Dynamic URL" />
I need the URL content to change automatically to the dynamic link on the page.
The redirection should only happen if the specific dynamic link is found on the page
The website is a blog site on WordPress with multiple categories & the dynamic link can be found in a specific category.
You should not use html to redirect. Simply add a hook in your functions.php
file like this :
add_action( 'init', 'my_redirect' );
function my_redirect() {
if( $my_condition ) {
wp_redirect($my_dynamic_url);
// See https://developer.wordpress.org/reference/functions/wp_redirect/
}
}