The wp-redirect tag has no wiki summary.
0
votes
0answers
20 views
How to add custom query string to home page without being redirected to the posts page?
When permalinks are ON, I add this query var to my home page URL and I get redirected to the posts page or 404...
domain.com/myvar/myvalue
domain.com/?page=1354&myvar=myvalue
...
0
votes
3answers
51 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
46 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 ...
0
votes
0answers
17 views
Redirect registration=disabled page
I need users who land on this page...
http://subdomain.example.com/temp/wp-login.php?registration=disabled
To be redirected to http://subdomain.example.com/temp/register
I am using multi-site so I ...
1
vote
1answer
81 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
19 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
25 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
40 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 ...
0
votes
2answers
89 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
0answers
131 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
103 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
0answers
65 views
HTTP Code 302 on Google Webmaster tool
I'm running a wordpress blog.
My blog is very young. It's online since a couple of months.
My host is godaddy.
I'm not a SEO expert.
Recently I noticed that on my webmaster tools (from google) there ...
0
votes
0answers
24 views
Block Contributors from admin EXCEPT allow delete posts from front-end
I have a site with some front-end post creation and editing capability for Contributors. I would like to block all non-admins from the admin, but allow them to delete posts via links created via ...
0
votes
0answers
11 views
Pagination doesn't work using custom query (GET), WP redirects to paged url [duplicate]
I am using the Better pagination via: http://sltaylor.co.uk/blog/better-wordpress-pagination/ and for some reason the pagination url gets redirected by Wordpress.
The pagination query should be:
...
0
votes
1answer
92 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
60 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:
...
0
votes
0answers
17 views
How we send information along with url [closed]
I just want to send some information along with url just like we send in PHP when we click on any anchor tag
<a href="some.php?id=info">click here</a>
Now i want to send information ...
-1
votes
2answers
47 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
139 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
49 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
60 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
77 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
84 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() ...
0
votes
1answer
104 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
187 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
113 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
758 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
401 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
75 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
84 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
172 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
55 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
258 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
199 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
69 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
42 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
125 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 ...
1
vote
0answers
252 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
103 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
84 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
908 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
510 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
345 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 ...
1
vote
2answers
121 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
2k 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
992 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
284 views
Redirect the non-www version of the site to the www version to remove duplicate content [closed]
In wordpress site how to Redirect the non-www version of the site to the www version to remove duplicate content
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond ...
0
votes
2answers
145 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
757 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
3k 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';
...

