Redirects the user to a specified absolute URI.

learn more… | top users | synonyms

1
vote
1answer
19 views

Getting “too many redirects” when using wp_redirect for attachment page

Code comes from the codex: <?php wp_redirect( get_permalink( $post->post_parent )); exit; ?> I added the above, in an empty attachment.php page. When I visit an attachment page (eg. ...
0
votes
1answer
17 views

URL rewrite before template_redirect called

Logic I have a page template at /blog that contains a "public" blog. I have a page template at /members that is members area. If a user enters the URL /members/blog I want to catch this in the ...
0
votes
1answer
20 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 ...
1
vote
1answer
21 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
34 views

Manually Create PHP Page For A Redirect

I am new to wordpress and working on something for a friend, I have FTP access, and am trying to upload a php file, that checks the platform and redirects the user either to the iTunes store if they ...
1
vote
1answer
41 views

is_user_logged_in not working to redirect only logged out users

So I have the code below in my functions.php file. It works for logged out users but it also redirects users that are logged in. Can anyone help? add_action( 'template_redirect', ...
0
votes
1answer
33 views

Perform a redirect after user action

Is it possible to redirect a user in WP without the header/wp_redirect being before header()? I have a plugin that allows users to manage content they have created on the site... for example, they ...
0
votes
0answers
52 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 ...
0
votes
1answer
60 views

Use wp_redirect without filter in plugin file

I created a little private plugin for me, which contains a form, that saves data to a database. Every user should only have one dataset. If he already has one, he should only be able to edit his ...
1
vote
3answers
73 views

Show different page for first time user

As per my requirement I need to show a page say firstpage.php for user who visit my site for first time else should show home page say homepage.php I created both this pages as page-templates For ...
0
votes
1answer
63 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
133 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 ...
0
votes
1answer
46 views

template_redirect to accompany with a shortcode

In one of my plugin's shortcode I'm handing user login / registration on the fly with a post submission. So the whole thing is happening within the shortcode like: <?php function this_shortcode() ...
0
votes
1answer
103 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
33 views

How to display post in custom file not in archive file?

I create file content-expertises.php and display my category list. Now, When I click one my category name, it is redirect in category.php file not my custom created file like category-expertise.php. ...
0
votes
2answers
168 views

Is it possible to wp_redirect() to a new tab?

Is it at all possible to set up wp_redirect() so that it redirects to a new browser tab? If so, how can it be done?
-1
votes
4answers
103 views

Redirect page URL to home URL without using a plugin

How do I redirect this page URL, http://localhost/wordpress_rnd/?page_id=2, to the home URL, http://localhost/wordpress_rnd/, without using any plugins?
0
votes
3answers
1k views

wp_redirect() - headers already sent

I am trying to use wp_redirect() to redirect the user after successfully submitting a signup form on the page. It's not working and shows the following error: Warning: Cannot modify header ...
0
votes
0answers
72 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 ...
2
votes
1answer
101 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 ...
0
votes
1answer
56 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
121 views

Redirect User to login page

Well I am newbie to WP and the question may sound duplicate but even after trying for few days I can not make this work. I have integrated a custom login and registration form in my WP site which is ...
0
votes
0answers
36 views

use of permalink or 301 redirect plugin

Right now I have this website http://codem.dk/ here I have some link to some drills that I share in a group on FB and im using google analytic. It's a TYPO3 page, and im building a new WordPress page ...
0
votes
3answers
154 views

Missing domain http://./wp-… in redirects

I am migrating my WP website from staging to production and I have a problem with Dashboard access. When I try to access http://<domain>/wp-admin.php it redirects me to ...
0
votes
1answer
87 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 ...
1
vote
2answers
361 views

How to redirect a specific user after log-in?

I want to redirect an user and his user ID is 6. So I added this code into my functions.php if ( is_user_logged_in() ) { $user_id = get_current_user_id(); if ($user_id == 6) { ...
0
votes
0answers
53 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
2answers
108 views

How to set 301 redirection after moving WordPress blog?

I have moved my wordpress blog to new domain. Old Address : domainname.com/blog | New Address : newdomainname.com Please pay attention about old address and new address. Now I want to redirect all ...
0
votes
0answers
46 views

Capture the content of a second page to an output buffer

I have plugin with the following admin action which allows me to send the contents of a specific wordpress page to a registered user via email. The code was working perfectly, an email was sent and ...
0
votes
0answers
284 views

Redirect to Theme my login profile

I would like to redirect admin's editing of user using path "user-edit.php?=....", and redirect to mydomain.com/your-profile/ : "Your profile" is the profile created by the theme my login plugin ...
1
vote
0answers
87 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
1answer
1k views

Wordpress HTTPS redirect loop

I've been struggling to get HTTPS functional on my site for over ten hours now. I've got severe headache trying to set it up myself. I want you to understand that I tried several different ways to ...
0
votes
0answers
42 views

If Specified Page then Redirect Elsewhere in Plugin

There's a few parent pages that only exist for URL purposes, but the actual page themselves need to be redirected to the home page since they're blank. I'm trying to make a simple plugin that will ...
0
votes
1answer
233 views

Creating intro page in wordpress

I am trying to create a very simple "intro" page in wordpress which will display a 5 seconds video introduction and then will redirect to the homepage automatically. I saw that there are many plugins ...
0
votes
1answer
85 views

A good hook to check authorization and redirect?

It seems strange to put a redirect in a template page, because so much of the page has already been built by the time you reach a custom page template. I'm wondering what is a good action hook to use ...
0
votes
0answers
68 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
2answers
37 views

All links in WP blog redirect to main non-WP site

I worked on a Drupal site for a client, but he wanted to keep his blog on WP, so I manually created a 'blog' folder on the root of the Drupal site and moved all the WP content there. I uploaded the ...
0
votes
1answer
61 views

Redirect to Page URL for non-members

My membership plug in won't let me re-direct custom post type archive / taxonomy URLs to a non-member page if the user requesting access is not logged in or not a member. So, I am trying a hack to ...
0
votes
1answer
197 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
97 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', ...
2
votes
1answer
2k views

Redirect if not logged in?

I've tried this to redirect people who aren't logged in to certain page. It ultimately shouldn't matter what front end page they visit, but should redirect to whatever page is chosen as the landing ...
0
votes
1answer
149 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
28 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
1answer
3k 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
55 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
209 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
15 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
225 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
77 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
629 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 ...