Redirects the user to a specified absolute URI.

learn more… | top users | synonyms

0
votes
1answer
12 views

Set a variable to using in redirected page

I need to set a global variable that will be used in the page set on wp_redirect global $open; $open = FALSE; function open_menu($user_login) { global $open; $open = TRUE; ...
0
votes
1answer
14 views

Which method to use when deleting posts from the front-end

I am trying to enlist all my posts on the front-end along with delete and edit links (using the shortcode API). I am having difficulty with the delete links. To me the most obvious way to handle ...
0
votes
0answers
24 views

Redirecting sub-domain to main domain works, links within page include sub-domain in URL

I just redirected my sub-domain, www.simco-apts.com/testsite to takeover my main domain, www.simco-apts.com. While this works for the homepage, all other links/pages contained within the site add ...
0
votes
1answer
142 views

Why does enabling Permalinks make pages not found?

I'm new to Wordpress and am creating a site using v3.9.1 of WordPress. When I create a new page, I can see it in edit mode, but the URL it is supposedly creating is not found when permalinks is used, ...
0
votes
0answers
21 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
1answer
51 views

Redirect if string found in URL

I'm trying to redirect non-logged in users to the login page when viewing any pages relating to a plugin. My code is working fine when I specify which pages they can't view, but I'm trying to pull in ...
0
votes
1answer
8 views

How to remove post redirects

I recently installed a plugin called "Q and A FAQ and Knowledge Base for WordPress" Turns out it was lacking in the features I needed so I trashed every faq I had created and then deactivated the ...
0
votes
1answer
102 views

Troll the hackers by redirecting them

My website is getting somewhat popular, and with the it's increasing popularity there's an increase in the hackers. Last night I visited my security logs and found that everyday approximately 10 ...
0
votes
0answers
48 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
1answer
140 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 ...
1
vote
1answer
39 views

Multiple portfolios and single item in two of them (ideas?)

I’m creating a theme at the moment and has come to a point to decide what is the best solution to have implemented for a theme with multiple portfolios. If there is a project that is in the two of ...
0
votes
1answer
74 views

A blank page is shown after I add a Function

I am redesigning a template. So I am trying to show a holding page till the redesign process is done. I ever used following function for the purpose on many other projects and it's redirected to the ...
0
votes
1answer
101 views

Redirect Attachment Page to Attachment

I'm trying to change my attachment page to just automatically redirect to the attachment. Here's what I've tried: Get attachment ID and redirect to that URL: $urlArr = ...
0
votes
1answer
130 views

redirect does not work in ajax function

I'm using ajax to post the form data. In the end I want to redirect to homepage. I'm trying following code, it does not work. It returns error 302. How can I redirect in the following function? ...
0
votes
3answers
229 views

Getting redirect to happen before header output

Anyone know of a way to trick WordPress into doing a header location redirect. I have to check whether users are logged in or not, and if not redirect them to our organizations authorization system ...
0
votes
1answer
47 views

HTML Redirect to WP pages

I have some predefined links that I need to redirect to real URLs within my WP install. I have NO CHOICE but to use these URLs provided to me, unfortunately. The format is: ...
0
votes
1answer
35 views

Some Pemalink problems, probably caused by wrong .htaccess configuration?

I have import on my local webserver a backup of a website made using WordPress but I am finding some difficulties with PermaLink configuration The main problem is that if I use the permalink setted ...
0
votes
0answers
104 views

url_to_postid redirected posts

i wanna url_to_postid some urls, it work pretty fine but when it come to auto-redirected posts it fail to return postid. here is my example urls: http://animup.net/anime/kuroko-no-basket-2/ auto ...
0
votes
0answers
51 views

wp_redirect on multisite

I have a multisite setup with subfolders (rather than subdomains). There are 3 sites installed which will use the same theme but in English, French and Dutch. I want to use wp_redirect in the header ...
0
votes
2answers
65 views

Redirect returning users to a certain page?

Is there a way to redirect users returning to the site who are already logged in? Assuming something like: function returning_redirect() { //code here } add_action('auth_cookie_valid', ...
0
votes
1answer
70 views

Redirect to URL if x number of days passed

Let's say I have this URL: www.example.com/myCPT/post, here I want to check if 3 days has passed since the post was created to redirect to www.example.com/myCPT/post/stats. In this 3 days time frame ...
0
votes
1answer
241 views

wp_redirect hangs, but returns true

I have no idea what I'm doing wrong, but I can't get the wp_redirect to actually redirect the page. I enabled the wp_debug to check for "header already sent" errors, but nothing. I installed the ...
0
votes
0answers
141 views

WP_Redirect on User Region - GeoIP

I have a main homepage for my site and will have several other 'homepages' for different countries in the future. I am trying to redirect the user to the right 'homepage' for their country based on ...
0
votes
2answers
55 views

Controller functionality - User not logged in/ redirect to registration page (not wp_login)

I have a site here... If a user clicks on Submit an Event or Send an Article, they are re-directed to a 404 page because I have it set up to make the page private. What I want to do is if the user ...
1
vote
1answer
51 views

301 Redirect Code

I am currently trying to redirect a subdomain.blogger.com blog to a domain located on my hosted WordPress install. The code below is supposed to send a 301 redirect and then make that specific post ...
0
votes
2answers
371 views

How to redirect to cart page using wp_redirect [closed]

I am trying to the redirect on a cart page using a bellow code but,I am not able to redirect on cart page . wp_redirect("'.home_url('cart').'");
0
votes
2answers
376 views

wp_redirect not working from shortcode function

Whenever I use wp_redirect(plugins_url('account/login')); in a shortcode function I get the following error: Warning: Cannot modify header information - headers already sent by ... Is there any ...
0
votes
1answer
519 views

wp_redirect not working on admin menu page

Im trying to create a admin menu link on the backend dashboard, that will take users to the front end of their site. Im trying to use this code, but for some reason the redirect is not working. // ...
0
votes
0answers
38 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 ...
1
vote
1answer
357 views

Problem with is_page & wp_redirect

I use cookies to determine which menu I should use on my website. This is working fine, but I want to force the correct one if someone views the URL directly instead of via the URL with a query string ...
1
vote
1answer
80 views

blog url redirecting

I used to host a word press blog and a forum on a server (srv71) with a domain name. And a few days ago I transferred my whole site to a new server (srv14) but I havn't updated my dns and I've ...
0
votes
1answer
99 views

wp_redirect only works for external pages

I want non logged in users to be redirected to the homepage which has a login/register form. After logging in all pages will be accessable. I've added the following code to my header.php <?php ...
-1
votes
1answer
129 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', ...
0
votes
0answers
112 views

wordpress step form - how to move values to next step?

I am building a simple step form (step1 -> step2 -> step3) At the first page, I did like this. if( isset($_POST['step1']) ) { include_once( get_template_directory() . ...
0
votes
3answers
161 views

pre_get_posts redirecting

Is there any possibility to redirect visitors to home page, for example, if they aren't allowed to view page's/post's content, using pre_get_posts action? I'm trying to develop a simplified ...
0
votes
0answers
206 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 ...
1
vote
1answer
76 views

Redirect outside WP after login

I have http://example.com/admin.php There I check whether the user is admin or not. If not, I send the user to the wp-login page like this: ...
0
votes
1answer
148 views

do more action after wordprss login successfully

I have a simple requirement, after user login set the login user session and then redirect to another page. Yes, I found some similar page from here is-there-a-hook-that-runs-after-a-user-logs-in As ...
-1
votes
2answers
41 views

Homepage redirects to other site of mine? [closed]

I have a website in which the home page redirects to a different site, which is also from me. I tried getting on it yesterday and then, it was fine. But now, this evening, when I never touched a ...
1
vote
2answers
458 views

wp_get_referer not working properly after wp_redirect

Thank you for reading! There's a lot redirecting going on on the site I'm creating. For example, if not logged in user access a "private" page, he will be redirected to a custom login page. if ...
0
votes
2answers
713 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
1answer
263 views

Front end posting

This source works with image upload. Without image upload, it works, but 'redirect' doesn't work. What should I do?? Any suggestions to what the problem might be? if( 'POST' == ...
0
votes
1answer
201 views

Front end posting, not working wp_redirect with 'cannot modify header information' error

Im trying to make front end posting page but, sometime 'wp_redirect' is not working with 'cannot modify header information' error. adding data is working well but I don't know why is working well ...
0
votes
1answer
110 views

WP Redirect is not working

I am trying to redirect to another URL using this code-- $siteurl= get_site_url(); //echo " This is basic property search.... now redirecting"; //echo "\n\n Redirect URL for property posts=" + ...
0
votes
1answer
214 views

Correct method of redirecting user login

The popular membership plugin 's2Member' uses the wp_login action hook to wp_redirect a logged in user to where s2 deems appropriate. This causes a conflict with other plugins, in that other plugins ...
0
votes
1answer
156 views

Front-End Form Submission in Shortcode

The plugin I am working on contains shortcodes with forms on them. Upon form submission (POST), I do some database work, and then planned on redirecting to another page after the db work is complete. ...
0
votes
0answers
410 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 ...
1
vote
3answers
3k 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
165 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 ...
1
vote
1answer
254 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 ...