WordPress php redirect -


i've added code below functions.php file in wordpress it's not working -- tips?

if(is_page( 'company-registration' ))   {       wp_redirect('http://www.example.com', 301 ); exit; } 

http://codex.wordpress.org/function_reference/is_page

by not working mean redirect not taking place. have tried using wp page id.

you should wrap snippet in function hooked template_redirect, or put @ top of page.php (or other page template), before get_header call.


Comments

Popular posts from this blog

c# - DetailsView in ASP.Net - How to add another column on the side/add a control in each row? -

javascript - firefox memory leak -

Trying to import CSV file to a SQL Server database using asp.net and c# - can't find what I'm missing -