Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

One of my clients has installed a theme where when a visitor enters their username and email to register as a new user they get shown a link to download a custom report file.

This was working fine on my clients test installation, but now they've converted the site to a live site the download link doesn't show and instead the page uses the homepage template...

I'm stumped as to why it's happening so any advice would be great.

Here's the test page

Here's the live page

Here's a jsFiddle of the PHP code

share|improve this question
    
The two pages look identical to me. Can you point out the difference? (And maybe clear your cache.) And in general it is better to post the code here than to point to jsFiddle. –  helgatheviking Apr 8 '13 at 20:05
    
If you enter some dummy information into the boxes you'll see the difference. The test site shows the download link perfectly, and the live site reverts to the homepage template... –  Dean Elliott Apr 8 '13 at 20:06
add comment

1 Answer

up vote 0 down vote accepted

The difference between the two is that the test site has pretty permalinks enabled and the live site doesn't. If you look at the URL, the issue becomes apparent, this is not a valid URL/query string:

http://www.veredor.com/?page_id=140?register=true

If you change the second ? to an ampersand, the page renders correctly.

Either enable pretty permalinks on the live site, or modify your code with add_query_arg to correctly append the additional query argument:

<input type="hidden" name="redirect_to" value="<?php echo add_query_arg( 'register', 'true' ); ?>" />
share|improve this answer
    
I had a feeling it might be this but my client was taking their time to give me their FTP details (They're using a Zeus server which requires a custom script to allow pretty permalinks). –  Dean Elliott Apr 8 '13 at 20:36
    
Nice catch Milo. And Dean, I feel your pain, I had a client running WP on a windows server. Can't everyone be on a LAMP stack!? –  helgatheviking Apr 8 '13 at 20:49
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.