Redirects the user to a specified absolute URI.

learn more… | top users | synonyms

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
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: ...
0
votes
2answers
510 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 ...
2
votes
1answer
163 views

Password protected page Hash url

I am using owl carosel which takes a hash url to go to a specific slide (http://www.owlcarousel.owlgraphic.com/demos/urlhashnav.html#five) Lets say I want to visit a password protected page with the ...
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
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
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
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 ...
0
votes
1answer
146 views

Wp redirect to url with ampersand string

i have a url like this: www.url.ui/?keyone=valueone&keytwo=valuetwo&ekythree=valuethree stored in a variable: $url = www.url.ui/?keyone=valueone&keytwo=valuetwo&keythree=valuethree ...
0
votes
1answer
282 views

Use Parent Pages for URL Structure without Landing Page

So this is more a philosophical question than anything, and if I'm asking this in the wrong place, I'm happy to remove the post: What's the best way to use a parent page for structure while keeping ...
0
votes
1answer
81 views

How to Manually Upload Files via FTP

I am helping a friend who has a site self-hosted via Wordpress. They have access to their FTP. Now I am familiar with manually updating files through the FTP and that is how I usually update my sites. ...
0
votes
1answer
168 views

Check if redirected from a specific page template

I have a page template, which redirects to the homepage using this: wp_redirect( home_url() ); Now, on the homepage is it possible to check if it has been redirected from a specific page template ...
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
398 views

force login and redirect to custom login page

I am really desperate, looking for a solution for days now. I need to achieve: restricted access for logged in users only not logged in users need to be redirected to a custom login page I am on a ...
0
votes
1answer
111 views

Redirect loop when forwarding to mobile site

I have successfully redirected my page to m.example.com from example.com when i open in mobile environment with this code in functions.php add_action('template_redirect', ...
0
votes
1answer
912 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
1answer
274 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
1answer
84 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 ...
-1
votes
1answer
361 views

Admin Menu new tab external link

In a clients site i needed to add a menu item under the dashboard, this link is to go to a external url. i managed this with the following code: add_dashboard_page( 'redirecting', 'Docs', 'read', ...
2
votes
0answers
33 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
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: ...
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 ...
1
vote
0answers
181 views

How to wp_redirect on 'init' hook on condition of current post id?

I have made a shortcode, because we can't redirect page within shortcode using wp_redirect so I used 'init' hook to check the $_POST/GET parameter and make system redirect. But I'm stuck in a ...
1
vote
0answers
140 views

Redirect to specific page

I am using Wp Store Locator plugin.And I have Modified it according my need.But I am stuck in redirection. Basically this plugin works with short code.So at the time of listing my URL is like that : ...
1
vote
0answers
123 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
0answers
13 views

The custom “Delete Post” button works only on second time you click it

I created a delete button on frontend for blog posts and custom type posts and I would redirect to a specific page after deleting them. The code that I used for the deleting url is: add_query_arg( ...
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 ...
0
votes
0answers
29 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
0answers
17 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
0answers
31 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
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
0answers
43 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 - ...
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
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
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
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
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
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
0answers
135 views

Does wp_redirect keep the referrer?

I'm monitoring traffic from Google, and if the traffic source is google, I want them redirected to the same URL, but with an appended GET variable, such as http://example.com/article should be ...
0
votes
0answers
74 views

Rewrites: .htaccess or wp_rewrite for bulk 301 changes?

I'm migrating a site from an older CMS to WordPress. We'll be on the same domain but about 90-100 pages are going to have modified URLs - so, for them, I'm creating 301 Rewrite rules. My question is: ...
0
votes
0answers
66 views

Create a constant download link that always points to latest attachment

I plan to have one attachment per post and the attachments will often be receiving updated versions with different file names. I have an issue where users copy and paste the file url and send it via ...
0
votes
0answers
86 views

Members only Passthrough

So I made a members only site with wordpress by redirecting everything to the homepage and adding a registration/login page to my homepage. This was added as a plugin: /* Change Login URL */ ...
0
votes
0answers
43 views

Redirect outside wordpress

I have a folder called "stats" on my server that I cannot access anymore because wordpress redirects it to the "Page not found". This folder has nothing to do with wordpress. I have searched for a ...
0
votes
0answers
528 views

How do I combine wp_redirect and add_filter?

I have a multisite, where I would like any subsites to share the same login, register and lost password page. Those pages are custom pages and located on the main site. So far so good. The problem I ...
0
votes
0answers
799 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 ...