Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [wp-redirect]

Redirects the user to a specified absolute URI.

1
vote
0answers
7 views

Redirect user to previous page after signup from custom form

I've looked on here and found lots of references to this, but none have worked for me, probably because there must be something in the custom code I am modifying that I don't quite understand. Having ...
0
votes
1answer
11 views

Overiding wp_santitize_redirect for | character

I am not really conversant with php and I have an issue with wp_sanitize_redirect. I have seen this excellent question and answer: wp_sanitize_redirect strips out @ signs (even from parameters) -- ...
0
votes
1answer
22 views

Problem in redirect link in wordpress

I created a login page in wordpress and redirected the page to another website . Now, after clicking the login icon from the menubar it redirects to another page. Thats fine. But I cant access the wp-...
1
vote
1answer
42 views

WordPress Redirect Not Working - AJAX Callback Response Not Picked Up

I cannot get a redirect working in my custom wordpress plugin. I have a button on a page which triggers an AJAX action which calls a function. In my function (which is definitely being called as I ...
0
votes
0answers
15 views

How to redirect attachment page to actual file URL

I have a minor problems with my blog. When I click on attachment page, it automatically redirect to the actual file attachment. For example: When I click on: http://localhost/blog/my-media-file ...
0
votes
1answer
9 views

saving variables after redirect

Is there a way to save a variable after you redirect to another page. For example... I want to save the password submitted from my form into the variable $temp_passkey, and be able to access it on the ...
0
votes
2answers
20 views

wp_redirect doen't work

I am writing a simple plugin to accept a user number, show a form with information about the user, then post a payment amount. The user number is obtained from this http file include_once(...
1
vote
1answer
147 views

header and wp_redirect not working. cannot modify header information warning

Does anyone know another way to redirect without header(); giving me this error? wp_redirect doesn't work for me either... This is the error I'm getting: Warning: Cannot modify header information -...
0
votes
0answers
10 views

how to redirect folder and its subfolders to subdomain

i have a wordpress blog and i have changed my "uploads" folder to subdomain. My previous address was like this. https://guilaneman.ir/wp-content/uploads /.../.../ my new url: https://images....
0
votes
0answers
17 views

Non-www is redirect to admin page

The website is redirecting domain.com (non-www) to the admin login page. I don't want that. www.domain.com is showing the website in a correct way. Anyone knowing the problem with the non-www ? ...
0
votes
1answer
32 views

Php function 301 redirect

I am using this code so that when the user visits the old permalink, he gets redirected to the new one. add_action( 'template_redirect', 'redirect_to_external_url' ); function ...
0
votes
0answers
16 views

Redirect problem on login page

I've create a custom page with a login form but I have a problem. When try to login I automatic redirect to my same login page (in my case I have the form on home page) and ULR change from www.mysite....
0
votes
1answer
24 views

Detect what link user clicks and Redirect to a specific page for logged in users only

I have a link in my WP website Account link. I would like this to work normally for logged out users. However for Logged-in users i would like this link to take them to another page url. I have tried:...
-1
votes
1answer
29 views

Redirect specific link for logged in users only to specific URL

i have a custom Woocommerce link that adds a product to the cart and redirects user to the account page: account/?add-to-cart=15169 I'd like this link to redirect only logged-in users to some ...
0
votes
2answers
155 views

main-domain of wordpress keep redirecting to subdomain

I was in process of deploying my wordpress website mysite.com/NewSite to mysite.com during the deployment I messed up something and my main site has started redirecting from mysite.com to mysite.com/...
-1
votes
1answer
138 views

Cannot modify header information - headers already sent

So I have a form on one page, which is submitting to admin-post.php, then there is a function in functions.php which is processing the form. It stores the input field data to database and then after ...
0
votes
0answers
84 views

wp_redirect() function does not redirect to another page

I have a form on one page and submit it to admin-panel.php, where in functions.php I have a function which takes the input data, stores it in database and then the user should be redirected to another ...
-1
votes
1answer
247 views

show payment receipt in woocommerce thankyou page with custom payment gateway?

I'm developing a payment gateway for WooCommerce with my client's bank that provides an API and actually I can process the payment correctly, but I need to show the transaction receipt in the thankyou ...
1
vote
1answer
37 views

Redirect a page based on last word in slug

I have a couple custom post types registered = Staff, Properties If I have a page with the slug archive-staff, how can I automatically redirect that page to the Staff CPT archive page with a php ...
0
votes
1answer
8 views

Internal redirect from page to category

I want to implement a page, let's say /today-deals that will show all posts under today category, like if we were navigating to /category/deals-for-october-31-2018 but without changing the URL.
0
votes
0answers
35 views

Frontend registration form doesn't save data only redirects to wp-login

I have another wordpress dilemma... I've built a frontend registration form, but for some reason whenever a user tries to register it doesn't work, and they get redirected to wp-login.php. The ...
0
votes
1answer
53 views

Redirect regex misbehaving when placeholder empty

I have the following 2 redirects active: /code-examples/(.*) -> /tutorials/android/$1/ and /code-examples/android/(.*) -> /tutorials/android/$1/ The first one has a higher position, so the ...
0
votes
1answer
87 views

Redirect to first child in menu

I have the following page hierarchy: Page Grandparent (This page) Page Parent 1 (Should direct here) Page Parent 2 Page Child Page Child Page Parent 3 Page Parent 4 My parent and child pages have ...
0
votes
1answer
20 views

Wordpress Redirect After logging

The following code below allows to me authenticate user against a custom table I created: function authentication($emailAdd, $password) { include_once('././wp-includes/class-phpass.php');...
0
votes
1answer
22 views

How to after saving or publishing a post redirect back to the original page

When viewing a list of posts on the admin page wp-admin/edit.php I click on edit. I then finish editing the post, click on save or publish and expect to be returned to the original admin listing page ...
0
votes
2answers
55 views

So how to redirect category to a page of the same name if it exists?

So I had previously tested a specific redirect where I knew the page exists. function nepal_template_redirect() { if ( is_category( 'nepal' ) ) { $url = site_url( '/nepal' ); ...
0
votes
1answer
25 views

How to fix automatic redirects?

All page links of my wordpress website are automatically redirecting with additional string which looks like this "/#.W6nTIaV-7pE" eg: https://supremeip.com/Trademark https://supremeip.com/Trademark/...
0
votes
1answer
72 views

“Cannot modify header information” means I can't use wp_redirect

I am working on a site where new users are expected to agree to read our site policy before they can proceed. Once a new user logs in, they are redirected to the policy page. To continue to the read ...
0
votes
1answer
16 views

Redirect /member/ to /member/user

Is it possible if an user is loggued to redirect /member/ to /member/user ? (User is the display_name) If yes, how can I do this ? Thank you ! :) thanks to Jack, I tried to search on google "Wp-...
0
votes
0answers
12 views

wp_redirect not working when adding custom fields

I am trying to redirect when the admin clicks on the "Draft" button. The code is below $draft_txt_change = 0; function test_post_status(){ global $draft_txt_change; $year = date("Y"); $month = date("...
0
votes
1answer
130 views

Custom URL redirect in WP

I am trying to make my own redirect page for external link. My target My target is that, when a user open the link www.mysite.com/wp/GoTo/?URL=www.google.com, the browser open the page www.google....
0
votes
0answers
106 views

wp_logout() not working after form submission

I am pretty new to Wordpress, so please forgive me if this sounds like a silly question. I have a Wordpress Page which is using the default page.php template in my theme. I modified the page.php ...
0
votes
1answer
201 views

wp_redirect leading to an infinite loop

Goal: I have modified the permalink to show the category name for a specific category: grill-rezepte. By default the permalink is: https://website.com/post-title just the grill-rezepte is now: https:/...
0
votes
2answers
170 views

Notice: Undefined index: mtral_field_subscriber

Notice: Undefined index: mtral_field_subscriber in /wp-content/plugins/redirect-after-login/redirect-after-login.php on line 54 Warning: Cannot modify header information - headers already ...
1
vote
2answers
52 views

WordPress Global Redirect

I need to expand on this discussion Redirect entire website to a single page to include two pages rather than one. On this site, I need two pages to be live and all others to redirect to the home ...
1
vote
1answer
67 views

How to use Regex to add to a url?

Right now I have a bunch of old blog posts that I need to update to the new url structure. I added /blog/ to all of the new url, and old existing links just have the old format without the /blog/ ...
0
votes
3answers
41 views

Redirection problems

Please help me to overcome the redirection issue. I need to work on subdomain rather than working on the main domain but here both domain is different. What I did is - copied all (website.com) files ...
1
vote
1answer
24 views

Why my deleted url is redirecting to random post?

I am currently working on a multisite. I have deleted one of my microsite, let's say the microsite url is mysite.com/barrie/, but after deleting my microsite it's url is redirecting to a random post ...
1
vote
1answer
69 views

Custom pagination structure

Currently my pagination works like http://example.com/city/usa/ #for page 1 http://example.com/city/usa/page/2 http://example.com/city/usa/page/3 ...and so on I want to change ...
2
votes
2answers
51 views

Redirect users on specific post category or category page

im trying to redirect users on specific categry with this hook: // Show app-data posts only to app users function user_redirect() { if ( is_category( 'app-data' ) ) { $url = site_url(); ...
0
votes
1answer
32 views

How to redirect new registrars to a custom registration page instead of WP default registration page?

How to redirect the user from this page domain.com/wp-login.php/action=register to another page?
1
vote
1answer
23 views

How can I redirect to my custom page without loading the Dashboard itself?

I'm creating a page using: /** * Add the admin menu item, under Appearance. */ public function addAdminMenu() { $page = add_theme_page( esc_html__( 'Setup' ), esc_html__( 'Setup'...
0
votes
1answer
318 views

Why does my wp_safe_redirect output the ERR_TOO_MANY_REDIRECTS error?

I've built a demo page and now I'd like to redirect on it whenever an user logs in and hasn't set up his theme, my code being: function add_admin_page() { if ( empty( $_GET['page'] ) || $_GET['...
0
votes
0answers
24 views

Taxonomy redirect issue

After create custom post want to remove taxonomy slug from post url website name seersco.com/article but it show double article/article one for website and other taxonomy name. so want to remove ...
0
votes
2answers
96 views

Redirect to “Thank you” page after register new user on custom register form

Until now I was able to create the "Custom Register Form" on my Wordpress website, and send an activation mail to the registered user with the link for the activation. What I want to do is soon after ...
0
votes
0answers
13 views

Redirect to new DNS on WP

I have installed Wordpress on my server and got a domain name www.old.com. After a while, the customer asked for a new domain name: www.new.com. The customer wants www.old.com to be redirected to www....
0
votes
2answers
970 views

Cannot modify header information - headers already sent (wp_redirect in functions.php)

I already consulted this post and this post but did not see a solution. I need to redirect a page based on its $post->post_type and from what little I know, I can get this information inside the ...
0
votes
1answer
27 views

redirect to a custom page

i have created a plugin. the plugin replace the add to cart button, to popup with continue botton.for every product that the shop owner choose. i want that to redirect the user to my custom page when ...
1
vote
0answers
156 views

redirect post id to post full url

I use this permalink structure /%post_id%/%postname%/ in WordPress the problem is that posts are accessible via post_id for example: example.com/1415/how-to-make-a-cookie is accessible with this ...
0
votes
1answer
25 views

How to redirect to home page according to a specific page custom fields value and user name

I have some pages where specific users only should have access to those specific pages. So I created a custom field to assign the user name to the specific page. Custom fields : http://take.ms/tCCWQ ...