PHP Redirect

When creating parallax websites, or websites where all of the content is visible on one area, use the following to keep users from getting sidetracked from other areas of the website:

if(!is_page(2)) {
	    header("HTTP/1.1 301 Moved Permanently");


Modified from code sourced here.


This will remove the “Front Page Displays” options from the Settings > Reading area in the WordPress backend, and this can take a few minutes to undo if you need to revert.

Leave a Reply

katherine as a flat graphic icon

About Me

I’m an African / Ojibwe First Nations Web Developer living in Winnipeg, Manitoba.

Visit the Tips and Blog to see what I’m working on.