Company logo
  • Empleos
  • Bootcamp
  • Acerca de nosotros
  • Para profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
    • Bootcamp
  • Para empresas
    • Inicio
    • Nuestro proceso
    • Planes
    • Pruebas
    • Nómina
    • Blog
    • Calculadora

0

77
Vistas
How to redirect to a specific dynamic url on my page on wordpress

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.

6 months ago · Santiago Gelvez
1 Respuestas
Responde la pregunta

0

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/
     }
}
6 months ago · Santiago Gelvez Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar empleo Planes Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2023 PeakU Inc. All Rights Reserved.