Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

We have SSL for our domain. But there's only one page want to use SSL to appear on ( All others should be regular http:// pages. So we've set siturl and homeurl both to and hardcoded link to secure-page.

On regular pages, all the navigation and others links appear non-ssl (http://) which is fine. But when on, wp_nav_menu() returns https:// URLs for all other pages of site which we don't want. Remember, siteurl and homeurl both are http://.

Why is it returning all https:// links for nav items?

EDIT It is client's requirement unfortunately. There's only one page in site with HTTPS.

share|improve this question
Please explain why you want to do it that way. It could be that you are facing a XY Problem. – kaiser Mar 28 '14 at 7:40
Plz check EDIT. Thanks. – aceph Mar 28 '14 at 7:42
Then you need to fix the client, not WordPress. – kaiser Mar 28 '14 at 8:12
I guess the easiest way to get this done is set all the menu items manually using http://. If you want to do it programmatically, you can try a str_replace of the object $menu_item->url and wrap it in a is_ssl() condition. – Abhik Mar 28 '14 at 8:17

Your Answer


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

Browse other questions tagged or ask your own question.