Redirects the user to a specified absolute URI.

learn more… | top users | synonyms

0
votes
3answers
22 views

Redirect to login page

I am new to wordpress. I am running wordpress setup on http://localhost/wordpress/. I am facing two problems right now: Only the logged in users can access the site. So, I am trying to redirect the ...
0
votes
1answer
22 views

wp_redirect only works on main site and not on other sites

My main site is https://www.domain.com/, all my multisites will have https://www.domein.com/multisite1/ link. I made a function in functions.php which will check if the option (in the admin panel) is ...
0
votes
2answers
507 views

wp_redirect giving a warning: Cannot modify header information - custom plugin

I'm trying to do a delete action in custom plugin which uses a custom table and extends wp_list_table for showing the data. The problem is, whenever I try to delete the data I get cannot modify header ...
0
votes
1answer
911 views

Redirect after successful registration with fronted registration form

I am trying to redirect users after failed and successful registrations and logins. Everything works fine, except the redirection after a successful registration. Right now, I get redirected to ...
0
votes
0answers
16 views

Redirecting users to unique pages NOT based on their role

I'm looking for a way to redirect users to individual WooCommerce product pages based on a custom identifier. My website uses W2Member to control access to the site and I have a number of different ...
2
votes
0answers
32 views

Using a custom field value to redirect away from a 404 page

I’m moving from an old CMS to WordPress. The old articles are saved as posts and the new WordPress permalink is %post-id%. The old URL slug is unique and saved as a custom field for each post; the ...
1
vote
3answers
618 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
0answers
22 views

wordpress_redirect returns different headers for HEAD and GET requests

There's an odd behaviour I just noticed during some tests we're doing on one of our sites. We're verifying if the user isn't logged in and perform a wp_redirect in our theme's header.php like this: ...
0
votes
0answers
27 views

Mutisite subdomain redirecting to wp-signup.php

This appears to be common problem, but so far all the fixes I have googled do not appear to work!!! I have a main site www.suttonscouts.org.uk and wish to create a subdomain 1nw.suttonscouts.org.uk ...
0
votes
0answers
33 views

301 Redirect on wp multisite

I have tried to follow instructions see on couple of discussions and none of them seem to work . I have a domain viraleditorial.com and its running multisite network. I have subsite ...
0
votes
1answer
120 views

Redirect missing pagination to base page

I have a strange problem with wp_redirect that I can't seem to solve myself. I'm trying to redirect previously existing pages back to the root of the page so: ...
0
votes
1answer
51 views

Why does not this wp_redirect work in is_single()?

I have a custom post type (portfolio) and I have to redirect a certain page (of this custom post type) to another page. when I look at my custom post type page: So I wrote the code as follow to ...
0
votes
2answers
23 views

Strange redirect behavior after moving development site to client server

So I moved a Wordpress site I've been working on for a client to the client's host, setting up the installation in a subdirectory and planning to set the site address to the domain name once ...
0
votes
0answers
16 views

How do I redirect /search/ to ?s=

I have a Search page set up which uses the typical GET format <form id="searchform" action="http://example.com" method="get"> <input id="s" type="text" name="s" ...
0
votes
1answer
23 views

Redirect User From Registration Page To CPT (profile page) with custom url

I am looking for a little advice regarding wp_redirect after successful registration, the plan is a new user registers and is then re-directed on success to a custom post type page 'Agent' wp ...
0
votes
2answers
79 views

Clone a Post Tite and Custom Field into Custom Post type

I am using Simple Urls to setup redirects on my blog. I am trying to create redirects automatically upon publishing a post. For example, If i publish a post about StudioPress it will be automatically ...
0
votes
0answers
30 views

infinite loop wp_redirect

i'm building a website but i encountering some troubles i'm getting an infinite redirect using wp_redirect to a custom login page here is the code : require_once('form-template.php'); ...
0
votes
1answer
35 views

Passing User Messages to Another Page

I've got a form that does a fair bit of processing. Along the way, things may not work out as expected, and I want to display messages to the user. I've got that working. However, if things go well, ...
0
votes
0answers
53 views

Warning: Cannot modify header information - headers already sent

My WordPress redirection is not working, I'm getting this error: Warning: Cannot modify header information - headers already sent /wp-includes/pluggable.php on line 866 I am using this code ...
0
votes
1answer
21 views

Multisite setup help - plain domain/subsite always redirects to domain with subdir multisite

I set up a path-based wp multisite using subdirs for each site. It all works well except if the subsite is accessed without www. For example - //mainsite/subsite always redirects to //mainsite" ...
0
votes
3answers
428 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 = ...
0
votes
0answers
42 views

Woocommerce product option redirect to other product

I'm looking for a solution in woocommerce in a gateway that doesn't accept variable products. =( I have 3 products. Each one has 2 sets of 3 options So in product A: Option 1 - A | B | C Option 2 - ...
1
vote
0answers
25 views

Remove #wpcf7-f2450-o1 with Contact form 7 redirect

This is what I'm trying to do: I have a contact form, when the form submits I want to redirect to the page http://example.com/thankyou?c=thisisavariable . I can redirect, the problem is he redirects ...
0
votes
3answers
1k 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
0answers
25 views

Redirect Attachment to parent or homepage not working on Firefox

to prevent attachment pages to be indexed in SERP, I usually use the option in Yoast SEO plugin to redirect attachment to post parent page. But it does not work when an attachment has no parent, that ...
0
votes
0answers
24 views

wp-login via woocommerce (with redirect information)

I have a wordpress install (example.com), where users login with woocommerce at example.com/my-account instead the default wordpress-login page. I furthermore run a discourse-install on another ...
0
votes
0answers
15 views

How can I stop 301 Redirects on sub-domains?

I have a single-site installation located at: www.mysite.com. I have also created sub-domains VIA cpanel for development, eg: dev.mysite.com, it's mapped to a different directory on the ...
0
votes
4answers
23k views

wp_redirect() function is not working

wp_redirect($post->guid) is not working. How can I fix this? This is my code: if(isset($_REQUEST['vid']) ){ $id=$_REQUEST['vid']; $post_title = 'sasa'; $post_content ='zxczxczxc'; ...
0
votes
1answer
123 views

how to use wp_redirect inside a function

I have the following action and function. Ultimately i'm trying to get access to value $processArtwork in my template. One option is pass the value via the querystring. However the following results ...
0
votes
0answers
29 views

Wordpress Multisite htaccess redirect loop

I have a multi-site instance of Wordpress setup for a series of related websites. These work on a sub-directory approach (e.g. domain.com/team-events/). Within one of the sites, I have created a ...
0
votes
0answers
25 views

How to redirect deleted pages

I had several posts about individual books, which I combined to a post featuring all the books together. Now I want to delete and redirect those individual book posts to the combined post. I just ...
0
votes
2answers
22 views

How to make custom Wordpress page deliver search results

I have customised the standard Wordpress search.php and everything is working fine. Now, my client would like to be able to add some content to the beginning of the search results page in the same ...
0
votes
0answers
31 views

How to identifty post from its URL in 404 page?

Why GUID is such unstable? Some of the post's GUID are pretty permalinked, but most of them are default. I's using Pippin's function to get the post_id from its GUID, but it's not working if my site ...
0
votes
1answer
33 views

A way to redirect users when they log in based on their current page

I have a number of pages that are only viewable to users who are NOT logged in. I have a widget that allows users to sign in. I am trying to find a way for users who sign in whilst on these ...
0
votes
0answers
90 views

redirect to a users only page after login success

I have a page built that checks if a user is logged in before they can view the page. It uses the code below: if( !is_user_logged_in() ) { wp_redirect( home_url('/wp-login.php') ); } Now in my ...
0
votes
1answer
82 views

Force SSL on a single page which is used as iFrame

I have one WordPress page that only contains a shortcode for a slider and is used by other websites as an iFrame. I need to force SSL one this one single page, but whatever I try, it is not being ...
0
votes
0answers
111 views

Redirect based on $_GET parameters

I'm coding a payment gateway plugin for a webshop. I'm having trouble redirecting the users to two different pages based on the order status. In the payment sent to the gateway I can add one ...
0
votes
0answers
24 views

Proper way to set author pages at root?

I want to create landing pages for each user on my site in the same URL structure as most popular social networks: sitename.com/username But of course, I don't want to create pages for each user. ...
0
votes
1answer
94 views

Hide Author page from others

I am using author.php as an Author page. I have changed the author base slug to "profile" so a post author can view their author page at website.com/profile/name As these are basically personal ...
2
votes
3answers
4k views

wp_redirect() - headers already sent

I am trying to use wp_redirect() to redirect the user after successfully submitting a signup form on the page. It's not working and shows the following error: Warning: Cannot modify header ...
0
votes
0answers
115 views

How to get wp_redirect to work correctly

I have a new site that has had a permalink structure update. Old Structure: http://blog.mysite.com/%postname% New Structure: http://blog.mysite.com/%category%/%postname% My thought process was to ...
0
votes
2answers
56 views

Use wp_redirect to add a parameter

I am trying to add a function to my child theme to append the currently logged user as a parameter. For example, when the user test1 logs in and clicks on the following page: ...
-1
votes
2answers
794 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(); ...
1
vote
1answer
172 views

Getting “too many redirects” when using wp_redirect for attachment page

Code comes from the codex: <?php wp_redirect( get_permalink( $post->post_parent )); exit; ?> I added the above, in an empty attachment.php page. When I visit an attachment page (eg. ...
0
votes
1answer
82 views

URL rewrite before template_redirect called

Logic I have a page template at /blog that contains a "public" blog. I have a page template at /members that is members area. If a user enters the URL /members/blog I want to catch this in the ...
0
votes
1answer
66 views

Add action “page_template” not work with home page

add_action( 'page_template', 'fw_reserve_page_template_pending', 99 ); function fw_reserve_page_template_pending( $page_template ){ $page_template = /* My template Path */ return ...
1
vote
1answer
71 views

How to pass a message using template_redirect

I'm using the following function to redirect a post to another using custom field. It's working just fine until I added the line#8 to pass an ID so that I can grab it in to the post (to where was ...
0
votes
1answer
104 views

Manually Create PHP Page For A Redirect

I am new to wordpress and working on something for a friend, I have FTP access, and am trying to upload a php file, that checks the platform and redirects the user either to the iTunes store if they ...
1
vote
1answer
287 views

is_user_logged_in not working to redirect only logged out users

So I have the code below in my functions.php file. It works for logged out users but it also redirects users that are logged in. Can anyone help? add_action( 'template_redirect', ...
0
votes
1answer
102 views

Perform a redirect after user action

Is it possible to redirect a user in WP without the header/wp_redirect being before header()? I have a plugin that allows users to manage content they have created on the site... for example, they ...