Redirects the user to a specified absolute URI.

learn more… | top users | synonyms

0
votes
1answer
372 views

wp_redirect not working when going to www version of site

The following function works perfectly when logged-in visitors go to http://sitename.com, taking them to the site homepage. When logged-in visitors go to http://www.sitename.com, however, they're ...
0
votes
2answers
3k views

Checking if a user is logged in, if so redirect to a different page

I'm making a member-only site that requires users to be logged in to use the site. The homepage is publicly viewable. On the homepage, I'd like to put in a function to redirect users to a page inside ...
-1
votes
1answer
144 views

problem redirecting users to page on login

I'm trying to redirect certain users to a part of my site but I cannot seem to make it work... can you take a look at this and tell me what I'm doing wrong? if ( ! function_exists( ...
0
votes
1answer
333 views

Load template inside a parent template

Inside of my current theme directory, I created a folder called "mobile" which contains a separate set of template files, all optimized for mobile. Now, say I setup a function that detects a mobile ...
0
votes
1answer
184 views

Does WordPress send a 301 header message when you change permalink structures?

I have a super old blog that I upgraded from 2.0.7 to 3.1 by upgrading over multiple versions. One of my biggest concerns was losing all the link juice from my legacy URLs but they were clearly made ...
1
vote
1answer
791 views

Can I change default registration link (without htaccess)?

I'm using url like «wp-login.php?action=register&role=patient» and «register_form» hook for add extra inputs form which depends on urls like this: ...
0
votes
1answer
194 views

Error messages when adding code to function.php or trying to delete inactive plugin files

Error message below: Warning: Cannot modify header information - headers already sent by (output started at /home/content/79/7603579/html/listings/wp-content/themes/OIB theme/functions.php:519) in ...
6
votes
1answer
2k views

Pretty permalinks for search results with extra query var

I'd like to know how I can rewrite a search URL that also contains an extra query var into a pretty permalink using wp_redirect and the template_redirect hook. I have taken the code from the Nice ...
0
votes
1answer
829 views

Redirecting to a post based on a GET parameter and a custom field

I'm trying to redirect to a specific post based on a GET parameter. The value of the GET parameter is the value of a specific custom field. For example: http://somedomain.com/wordpress/?fid=xyzzy ...
0
votes
2answers
285 views

Redirecting simple big problem

i'm a little worried here. I'm trying to redirect EVERYONE that access my site to a specific webpage, and nothing is working! Currently i'm trying this code: function redirect_this() { ...
2
votes
1answer
2k views

How to hide/redirect the author page

I have a website where I let people subscribe. I would like to only show the author page for actual authors who have written a post. I wrote this code that checks for post the problem is I can't use a ...
4
votes
2answers
1k views

Why is wp_redirect() preferable to a standard PHP header redirect?

In asking a question about hooks and redirects, I was advised to use wp_redirect in place of the PHP header function. Just wondering why wp_redirect is preferable?
2
votes
3answers
2k views

How to 301 private posts rather than 404?

How do I 301 redirect private pages, rather than 404 them? If a post is private, WordPress filters it out in the SQL query, so there are no $post variables to work with. I'd like for this code to ...
0
votes
1answer
300 views

Date based redirects of posts that no longer exist

I want a more elegant way to express the following redirect: RewriteCond %{REQUEST_URI} ^/blog/2008/(.*) [NC, OR] RewriteCond %{REQUEST_URI} ^/blog/2009/01/(.*) [NC, OR] RewriteCond %{REQUEST_URI} ...
3
votes
4answers
793 views

Using a Theme inside a Plugin directory

I am building a mobile friendly plugin and put the theme directory inside the plugin directory. If it's a mobile browser, how can I redirect to the theme in the plugin directory? ...