I want to know how to redirect to the homepage [closed]

0

I want to change the redirect that currently sends to the same page, and I want to send you to the home page.

 $redirect = esc_url(wpneo_post('current_page'));

Thanks for your help

    
asked by Sborace 26.05.2017 в 02:31
source

3 answers

0

header ('Location: /'); exit (0);

    
answered by 26.05.2017 / 07:07
source
0

header ('Location: /index.php'); exit (0);

header ('Location: /index.html'); exit (0);

You can enter this in an if you want that if you have a condition redirect to home

    
answered by 26.05.2017 в 11:50
0

The fastest way is with the header function:

header("Location: [ruta_de_la_página]");
die();

in your case if you want to address the index.php and is in the same directory would be:

header("Location: ./index.php");
die();

I hope it serves you.

    
answered by 26.05.2017 в 17:43