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.

I'm using site_url() for my href for anchors. I want to control what when I send the user to a secure page or non secure page. I thought I could do that with site_url('/foo', 'http') and site_url('/bar', 'https') but the scheme is not changing. If I'm on a secure page and site_url('/foo', 'http') is set, the clicked page is still secure instead of non-secure.

share|improve this question
add comment

1 Answer

up vote 0 down vote accepted

What is original link?

var_dump( get_option('siteurl') );

If I am interpreting code right then for http protocol argument action is to not change the link. So if you have set up URL to be secure by default then function doesn't override that.

share|improve this answer
    
Yeah at this point in the site the site url is https. I'm guessing it changes the is_SSL() return. –  Clutch Apr 21 '11 at 20:20
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.