Navigate to the page, but.

 
Plock: Hi. I’ve added a plugin for URL-COUPON but when someone already has a coupon. and clicks a coupon link in email, it says that a COUPON is ALREADY APPLIED. What can I do to override whatever coupon there is

Doiley: So all these happens only when they click on the url? And the URL is?

Seaberry: Xenaxon: appreciate it’s a problem but stackoverflow it or something- don’t continuelly paste it here

Kitz: Dopazo: Is that wrong? Am I missing something?

Marasigan: Yes so think about this logically

Zmek: If is_page ‘Download’ { DO something } else { do something else}

Umphrey: Do you have anything there that does something?

Trinka: I thoguht the redirect was doing something?

Grayer: And anyway, had you told me what you really intended to do, it would ave been easier

Eckelman: Instead of trying to redirect, why aren’t you simply checking for mobile_detect and simply just replacing the link they click on?

Babine: Sorry- its very late where I am have been at this for days

Malich: Becuase this link will be in other places ie instagram, facebook so I’d rather users be directed approriately after they click

Dileo: Write code this way – if is_page ‘ Download ‘ { ALL CODE RELATED TO REDIRECTION HERE } no need for else, because you are not doing anything if it’s not the download page

Widner: Dopazo: Thanks, not still not right syntatically possibly- http://paste.pound-python.org/show/ruxUEXNWRsQ2LNF2PIbA/

Jacoway: Don’t mix the 2 control syntaxes. If you want to use if condition : and endif; do not use if condition { }

Dorries: Ycon_: I don’t see a reason for $detect being global

Westerheide: Jaaqo: Dopazo put that there- any reason?

Orrill: Of course not, it was an example from my code that uses $detect globally, and initialises it only once

Euler: Ok well removed it- but still having a syntactic error. Not sure what you ment by control syntaxes? Can you clarify

Molleda: Dopazo: Google result for php alternative control syntax : ycon_ – http://php.net/manual/es/language.types.string.php

Wnek: Http://php.net/manual/en/control-structures.alternative-syntax.php

Dorries: Ycon_: http://paste.pound-python.org/show/IBqaEFpy7TSHFtnA6QbP/ I just had to fix whitespace for you.

Anderson: Jaaqo: It still is giving me a syntax error

Bradby: It doesnt like line 2- if is_page ‘Download’ {

Hatten: Just needed a closing braket

Maine: Ok no syntax errors- but it is not re-directing. my pagename is correct. Is somethign incorrect here: http://paste.pound-python.org/show/xLdNmL6N9e2mDScuetEy/

Chuck: Well you still need to tell the system when the function must run

Narayan: I thought that was when I said “if is page” it runs?

Yray: So go add_action ‘init’, ‘mobile_redirect’ ;

Pogorelc: Although I do not know if init is the best to use here

Dronko: You’ll have to debug your code then, see where it fails at

Kulzer: Dopazo: Because the code itself should be 100% functional?

Portner: Jaaqo: any ideas why this is not redirecting? http://paste.pound-python.org/show/i7z03Q1ITSbpcQA1cLnK/

Golomb: Try add_action ‘template_redirect’, ‘mobile_redirect’ ;

Friehe: And I hope you are adding that outside the functioon

Cherrington: So far, it looks good

Bonardi: Hello clever people, i’m running wordpress under a reverse proxy environment and my wordpress admin area can sometimes miss the trailing directory on certain actions on forms, eg my domain is www.domain.com/subdir/ but the action in wp-admin area is just www.domain.com so it strips the “subdir” part out and thus then redirects me to a 404 page as it isn’t returning me the correct path. I’m really stumped with this, I can manually add the “subdir” and

Whitis: Navigate to the page, but for other users this is a bit too much. Any ideas?