Stack Exchange Network

Stack Exchange network consists of 174 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.

0
votes
1answer
19 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
26 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
21 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/...
0
votes
0answers
22 views

How to add to a redirect url in a form submission?

I have a form submission handled by add_action('init'). So when the form gets submitted it gets automatically redirected back to the origin site. Is there a way to add #something to the url without ...
-1
votes
1answer
30 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
19 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
34 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
28 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
6 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
28 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
29 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
18 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
14 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
48 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
22 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
39 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
11 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
52 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
62 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
81 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
64 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
48 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
37 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
40 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
39 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
32 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
30 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
22 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
168 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
15 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
60 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
12 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
623 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
25 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
134 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
14 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 ...
0
votes
1answer
16 views

Issue: Every link on the webpage redirects to blog posts

I have developed a website in wordpress, and everything seems to be working fine most of the time. Except that at undisclosed times, the website renders all links as if the user asked to see the blog. ...
0
votes
1answer
116 views

Logout redirects to default page

New to wordpress and not a php developer, but I'm currently having an issue with a user being redirected to a default wordpress page and being asked to confirm if the user wants to log out twice. I ...
1
vote
1answer
178 views

Why does wp_redirect strip out %0A (url encoded new line character) and how do I make it stop?

Does this have something to do with sanitization? I need to pass a string as a URL parameter, and that string has \n characters in it. When the URL gets to the client, all other encoding is there (...
0
votes
0answers
20 views

Redirect to home url after registration

I want to redirect user after registration using this code in my plugin, but it is not working, WordPress version is 4.9.4 add_filter( 'registration_redirect', 'my_redirect_home' ); function ...
0
votes
1answer
991 views

How to append a URL parameter to all external URLs

Is it possible to append ?ref=myref to all external URLs? If so I'm guessing I will also need to check if a ? already exists and use & if so. I'm a WP noob just coming from Joomla, any tips / ...
0
votes
0answers
144 views

redirect after account activation for forum using bbpress and buddypress

I have a site with a forum and am using bbpress and buddypress to control the forum. After you register you are sent an activation email and when you click the link in the email it takes you to the ...
1
vote
1answer
405 views

Redirect first category archive page to normal page

I am looking for a way to redirect only the first category archive page to a normal page I have created. I am using this code but this redirects all pages of the category archive. I only want the ...
0
votes
0answers
21 views

After Logging in to wordpress, website redirecting to home page. it should redirect to dashboard

i am facing issue login redirection issue, on my site when ever i tried to login through wp-admin or wp-login.php with admin details. website redirects me to the home page it should be on wordpress ...
0
votes
1answer
12 views

changing products urls - redirects

I created my website without not knowing much about seo. I am editing my products pages with yoast, and I am changing products urls. My site is new, I have just indexed it in google search console, I ...
1
vote
2answers
654 views

How to disable Uncategorized category URL?

I would like to disable the Uncategorized public URL (i.e. /category/uncategorized), since I'm not using post categories and already have the posts list with pagination on the main Blog posts page. ...
0
votes
0answers
258 views

Custom Login URL (Redirect to Popup Login Window)

In the header, there's a button where I click and it opens a popup login window. I would like to redirect to that popup login window by using the code below but I cannot find the link to that popup. ...