Redirects the user to a specified absolute URI.

learn more… | top users | synonyms

0
votes
0answers
552 views

Custom Front End Register Form Auto Login and Redirect

I have a custom front end registration form that I am using and everything is working fine except I have been trying to get it to automatically log the user in and redirect them to a specific page. I ...
0
votes
2answers
291 views

Headers already sent on a frontend post form using wp_redirect before get_header

I've gone through the various issues with headers already sent, checking for white space and making sure that the get_header line appears after the wp_redirect but I'm stuck. The code is: <?php ...
0
votes
1answer
486 views

Check if current page is wp-admin

I have created a common custom dashboard for my users located at "http://website.com/login/dashboard/" I'm trying to redirect users to that custom dashboard only if they are NOT admins & if the ...
0
votes
1answer
132 views

Option does not save or update upon page refresh

So I managed to get the issue of headers working properly in my theme, but I have a new issue with options though. I have the three following pieces of code that work in the order I paste them: ...
-1
votes
2answers
133 views

How we redirect to other pages in WordPress?

I am using an onclick function to redirect the user if they are not login. I am calling a php function in achor tag like this <a href="#" class="fright hrtacnhor" onclick="<?php checkstatus(); ...
0
votes
1answer
320 views

This webpage has a redirect loop issue

I want to redirect non logged in users to page id = 2 which have registration form. function checkLogged() { $pg = get_permalink(); if (!is_user_logged_in() && !is_front_page() ...
0
votes
1answer
266 views

Can Not Redirect from Plugin-Registered Admin Page

I am doing the following in my plugin: Register a custom admin page and in the callback function (the last parameter of add_submenu_page) Redirect to another page However, when I open the custom ...
0
votes
1answer
183 views

Temporary redirect prevents getting $_POST array

I'm sending a form from a woocommerce plugin. I've tweaked the thankyou.php page and added email sending functionality. However the $_POST array is empty. Inspecting with Chrome Dev Tools I found ...
0
votes
1answer
183 views

Redirecting old site links to new site

I'm hoping one of you WP gurus can help me out here... I have a website. Let's call it Jack.com I'm re-branding Jack as a girl, so I've made another website website - Jill.com I want all existing ...
0
votes
1answer
304 views

Redirect a password protected page?

I'm looking for the simplest way to redirect a password protected page, to another page after entering the password. E.g. <?php if ( is_page('name-of-page') && ! post_password_required() ...
1
vote
2answers
288 views

Unable to get wp_redirect() working after adding a CPT via the front end

I am attempting to learn PHP by creating a relatively simple application built on wordpress, it is a basic CRM and I've made decent progress but have been stuck on some of the finer points. I've been ...
1
vote
1answer
438 views

Redirect wp-login

I have a custom page called owner-login that has a wp_login_form() How can I disable wp-login.php so that: when a user writes wp-admin/ it will redirect him to the owner-login (if not logged) when ...
3
votes
1answer
381 views

Redirect after deleting post and keep track of pagination

I have a custom post list in the admin panel. This list is paginated, so this is it's url : wp-admin/edit.php?post_type=xxx, if I open the default page wp-admin/edit.php?post_type=xxx&paged=n, ...
0
votes
3answers
2k views

wp_redirect “headers already sent” after front-end submission form

I'm trying to practice with setting up a front-end post submission form. And I'm getting this error: Warning: Cannot modify header information - headers already sent by (output started at ...
2
votes
2answers
2k views

wp_redirect not working after submitting form

I'm using this redirect after inserting a post. It's not working, it only refreshes the page the form is on. I know the $pid is getting the post ID so what is the problem? This is the very end of my ...
0
votes
1answer
115 views

block a page from logged out users and redirect to homepage

How am I blocking certain pages from being viewed by logged out users? I have some pages like a dashboard for example that each user has to display their posts an is found in the top level like ...
0
votes
2answers
195 views

Redirect from the dashboard to edit.php if wp_is_mobile() is true

Looking for a way to redirect the user from the dashboard straight to edit.php if wp_is_mobile() is true. This is what I've tried: function redirect_if_mobile() { $screen = ...
2
votes
1answer
299 views

redirect pages with no content, instead of 404 error, using max_num_posts?

I have a site that has changed its pagination structure, resulting in a huge amount of 404 errors (more posts are being shown per page than previously, so there are lots of pages that were once ...
2
votes
1answer
82 views

Redirect users away from Admin breaks ajax

Tried to make a simple redirect for some users I don't want to access the wp-admin/, so I did this code: function no_admin_access() { if ( !current_user_can( 'delete_posts' ) ) { ...
0
votes
1answer
753 views

Headers already sent - Wordpress core

I'm getting an error on my site regarding "headers already sent": Warning: Cannot modify header information - headers already sent by (output started at ........./wp-admin/menu-header.php:161) in ...
0
votes
1answer
430 views

using wp_redirect to redirect to a permalink

I'm using wp_redirect to change the URL of my 404 page: function show_404($message = 'page not found'){ wp_redirect(home_url() . '/error/404?m=' . urlencode($message)); exit(); } I have ...
1
vote
0answers
91 views

Firing a function AFTER redirect

I am using a function that redirects the user to a custom page, rather than wp-login in the event of errors. In my case I am using the Http Referer function to send the user back to the same page ...
0
votes
1answer
60 views

wp_redirect and search engine bots

I have some pages and categories you have to be looged in to have access to. I am using wp_redirect to send anyone who is not logged in to the front page if they try to open those pages. Is it enough ...
0
votes
1answer
282 views

wp_sanitize_redirect strips out @ signs (even from parameters) — why?

In my wordpress site I have a hack that looks at the uri and does a redirect to a subdomain. The problem is wp_redirect calls wp_sanitize_redirect which will strip out @ signs, so when a user tries to ...
2
votes
2answers
575 views

How to use nonce with front end submission form?

Thanks to a variety of posts on here I've managed to put together a front end submission form. After about 24 hours of tweaking I've finally got everything working including a redirect to a 'success' ...
0
votes
2answers
141 views

How to redirect from one WP site to another

I want to set it up so when you click on a tab on my one site it redirects you to my other site. I've tried every code I can think of and nothing seems to work. Please help.
0
votes
1answer
99 views

Redirect within wordpress template/plugin

I've done a bit of googling, searching on forums, etc, and can't find a good answer. Here is what I'm doing: I need to pass a variable in the url to the page and have a rewrite to make it pretty. So, ...
2
votes
2answers
1k views

How to Rename wp-login.php for Multisite?

I want to hide and rename wp-login.php in my URL for branding purposes on a Multisite set up. From this forum post I see that I can change mysite.com/wp-login.php to mysite.com/login by inserting a ...
1
vote
1answer
959 views

How to do 302 redirects “in” WordPress using Redirection plugin?

I am planning to use the Redirection plugin to do redirects. The plugin's description states that it also enables 302 redirects, but I can't see how. There's no option as such (see screenshot below). ...
0
votes
1answer
643 views

How To Only Allow Users To View Their Own Buddypress Profiles?

I am currently developing a social-network sort of site using Wordpress + Buddypress and the client has asked that profile pages not be publicly visible for the time being. Basically the client is ...
2
votes
3answers
261 views

Need help to repair a 301 redirect problem

I have been having problems with my website and as a result did a Crawl test in SEOmoz. The test found a 301 Permanently Moved Redirect of all the pages on the website and it appears that they are ...
1
vote
2answers
4k views

Where does wp_redirect need to be placed to make it work?

I've got a front end post editing page located at mysite/post_id/edit and am trying to redirect users that are not the author back to the post. Here's the code I'm working with: <?php ...
2
votes
1answer
1k views

Force users to complete their profile after they register? How to

I am making a custom (quick) registration page in my wordpress site, to let users to register quickly by just filling username-email and choose their password. I have tpl-edit-profile.php, what ...
0
votes
2answers
219 views

Redirect the non-www version of the site to the www

In wordpress site how to Redirect the non-www version of the site to the www version to remove duplicate content
2
votes
2answers
1k views

Password change when the user login first time

I have a "change password" page. Is there a way to redirect that page when the user login first time using wordpress generated password? Thanks
-1
votes
3answers
7k views

wp_redirect() function is not working how to solve this

wp_redirect($post->guid) is not working,how to solve this. this is my code: if(isset($_REQUEST['vid']) ){ $id=$_REQUEST['vid']; $post_title = 'sasa'; $post_content ='zxczxczxc'; ...
0
votes
1answer
304 views

wp_redirect to file:// location results in blank page/cannot be displayed page

I have a CPT that is justed used for linking to resources on a local drive. I have this code in single-resource.php: <?php global $post; the_post(); $location = get_post_meta($post->ID, ...
0
votes
1answer
417 views

Why does the first page of one category redirect to empty page 4?

When I load this URL on my WP e-ecommerce site, it 301 redirects to page 4 which does not exist, and appears as a page with empty contents: Go to this URL: ...
0
votes
2answers
1k views

BuddyPress redirecting to home page on login

I have two sites (towermix.com and beta.towermix.com) running BuddyPress and both are doing the same thing. When a site admin (or contributor or author) logs in using the WordPress login page, they ...
0
votes
1answer
612 views

Redirect plugin after form submit or show errors

I've been developing a wordpress plugin that has an admin section with a form to add and edit various things. Now after an admin submits the form I wanted to redirect if successful (to show updated ...
0
votes
2answers
737 views

Question about proper use of wp_redirect?

I'm attempting to create a Twitter style stream, so basically just index, a tag archive, and maybe a page or two while prohibiting access to everything else. For instance, they try to access a single ...
1
vote
1answer
2k views

wp_redirect not working in header, exit is breaking page

Sorry to ask such a basic question, I've looked at other questions and not found an answer. I've customized some public pages with their own header-public.php, and I'm doing a basic login check for ...
1
vote
1answer
1k views

Controller functionality - if user is not logged in send them to specific page (not wp_login)

This sounds dead bang simple, but I just can't figure it out. I want the following functionality: If user is not logged in and they try to access anywhere on the site (including the homepage) - send ...
2
votes
2answers
903 views

Action wp_login_failed not working if only one field is filled out

I created a login form in the frontend with wp_login_form(). In my functions.php file I added an action to prevent the redirect to /wp-login.php if the login failed with ...
0
votes
1answer
196 views

Cannot get redirect working

I can't get wp_redirect working correctly? I thought I'd figured this out (see wp_redirect not working when going to www version of site) but apparently not; no idea what changed between last week ...
2
votes
1answer
1k views

redirect out of wp-admin, without losing admin-ajax.php

I'm trying to keep all non-administrators out of the Wordpress admin panel by using a wp_redirect inside of an is_admin conditional. The problem is that a side effect of this if that non-admins can no ...
-2
votes
1answer
82 views

How is WordPress redirecting/rewriting my URL?

i'm running a wordpress free classified website and the address is http://www.gosell.co.uk what i need is if a user from london open this url then it should be concatenated with ...
2
votes
1answer
336 views

Can't get rewrite rules working

Basically I want to rewrite: /edit/test-post to an existing page with a parameter: /edit?e=test-post From the examples in the Codex I created: add_filter( ...
0
votes
1answer
366 views

wp_redirect not working when going to www version of site

The following function works perfectly when logged-in visitors go to http://sitename.com, taking them to the site homepage. When logged-in visitors go to http://www.sitename.com, however, they're ...
0
votes
2answers
3k views

Checking if a user is logged in, if so redirect to a different page

I'm making a member-only site that requires users to be logged in to use the site. The homepage is publicly viewable. On the homepage, I'd like to put in a function to redirect users to a page inside ...