Redirects the user to a specified absolute URI.

learn more… | top users | synonyms

0
votes
1answer
121 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
267 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
163 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
443 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
178 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
269 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
31 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
66 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
178 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
1k 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
332 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
675 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
159 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
224 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
385 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
320 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
251 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
219 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
347 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
374 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
456 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
579 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
3k 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
129 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
228 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
370 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
94 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
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
551 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
93 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
66 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
404 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
816 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
146 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
105 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
2answers
1k 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
808 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
368 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 ...
0
votes
2answers
238 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
0
votes
3answers
10k 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
345 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
428 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 [closed]

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
677 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 ...