Redirects the user to a specified absolute URI.

learn more… | top users | synonyms

1
vote
1answer
99 views

Redirect outside WP after login

I have http://example.com/admin.php There I check whether the user is admin or not. If not, I send the user to the wp-login page like this: ...
0
votes
1answer
225 views

do more action after wordprss login successfully

I have a simple requirement, after user login set the login user session and then redirect to another page. Yes, I found some similar page from here is-there-a-hook-that-runs-after-a-user-logs-in As ...
-1
votes
2answers
42 views

Homepage redirects to other site of mine? [closed]

I have a website in which the home page redirects to a different site, which is also from me. I tried getting on it yesterday and then, it was fine. But now, this evening, when I never touched a ...
1
vote
2answers
641 views

wp_get_referer not working properly after wp_redirect

Thank you for reading! There's a lot redirecting going on on the site I'm creating. For example, if not logged in user access a "private" page, he will be redirected to a custom login page. if ...
0
votes
2answers
876 views

How to redirect non-logged in users to login with post_password_required()

I have created a membership site which is working how I would like in that non-members cannot view private pages. However, I want that when someone who has not logged in, clicks on a link that links ...
0
votes
1answer
359 views

Front end posting

This source works with image upload. Without image upload, it works, but 'redirect' doesn't work. What should I do?? Any suggestions to what the problem might be? if( 'POST' == ...
0
votes
1answer
253 views

Front end posting, not working wp_redirect with 'cannot modify header information' error

Im trying to make front end posting page but, sometime 'wp_redirect' is not working with 'cannot modify header information' error. adding data is working well but I don't know why is working well ...
0
votes
1answer
150 views

WP Redirect is not working

I am trying to redirect to another URL using this code-- $siteurl= get_site_url(); //echo " This is basic property search.... now redirecting"; //echo "\n\n Redirect URL for property posts=" + ...
0
votes
1answer
340 views

Correct method of redirecting user login

The popular membership plugin 's2Member' uses the wp_login action hook to wp_redirect a logged in user to where s2 deems appropriate. This causes a conflict with other plugins, in that other plugins ...
0
votes
1answer
194 views

Front-End Form Submission in Shortcode

The plugin I am working on contains shortcodes with forms on them. Upon form submission (POST), I do some database work, and then planned on redirecting to another page after the db work is complete. ...
0
votes
0answers
504 views

wp_redirect shows header already sent message

I am new to wordpress plugin development. I have created a list page and an add item page. When I add successfully, I want to redirect and it is giving me this error. Notice the error is on ...
1
vote
3answers
4k views

Redirect user after login/registration globally

How it possible to redirect all users, even administrators after login to specific page? And also redirect users after successful registration? Any simplest way? For example I want to redirect users ...
0
votes
2answers
202 views

Require re-login when logged-in user attempts to access restricted page

I need to restrict access to certain frontend pages, based on a user_meta field. All works fine, except when the user is already logged in but with the wrong credentials. In that situation I would ...
1
vote
1answer
296 views

Using wp_redirect and .htaccess to re-route searches (and pass along the remaining GET vars)

I'm trying to use wp_redirect() to redirect searches to a format that I have established in .htaccess. Unfortunately, I'm running into some problems doing this. I need to redirect search to a series ...
0
votes
1answer
32 views

How can I prevent redirects from mysite/page to mysite/wp path/page?

Apparently this is built into WP somwhere since going to mysite/wp-login.php takes me to mysite/<wp path>/wp-login.php (same for wp-admin and I presume other paths). The problem is, I don't ...
2
votes
1answer
72 views

How to set Active plugins as the default screen?

In my testing environment, I've got one hundred plugins. I'm more interested in seeing first the Active plugins than the complete list (All). How can I change the default screen for the Plugins menu ...
0
votes
1answer
190 views

Multi-part form and wp_redirect()

For starters, it's a plugin (with a shortcode) or at least I would prefer it to be. I've got two issues both related to wp_direct. If form 1 validates I want to redirect to form 2, and continue the ...
2
votes
2answers
2k views

Redirect on successful login

I am using the following snippet to control redirects after successful logins.... add_action( 'wp_login', 'redirect_on_login' ); // hook failed login function redirect_on_login() { ...
0
votes
2answers
371 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
776 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
163 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
279 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
423 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
365 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
283 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
236 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
391 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
436 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
467 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
700 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
4k 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
3k 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
138 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
257 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
409 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
97 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' ) ) { ...
1
vote
1answer
1k 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
610 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
101 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
70 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
2answers
502 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
933 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
150 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
113 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
2k 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
2answers
2k views

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

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
889 views

How To Only Allow Users To View Their Own Buddypress Profiles? [closed]

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 ...
3
votes
3answers
444 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 ...
2
votes
3answers
5k 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
2k 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 ...