Ready to get started?Download WordPress


how to exclude some pages from https (2 posts)

  1. Ruhul Amin
    Posted 2 years ago #


    i have inserted FORCE_SSL_ADMIN in wp-config. everything working fine. is it possible to exclude some admin pages from https.

    thank you

  2. bcworkz
    Posted 2 years ago #

    Short of a core hack, I'm not sure you can truly exclude admin pages, but you can remove the menu links that lead to them by hooking an action after the admin menus load and doing something along the line of if ($_SERVER['HTTPS']) unset($submenu[file.php][10][2]);
    It would at least make access difficult, though not impossible. $menu and $submenu are global arrays containing the menu structure. You'll have to print_r($menu); to figure out the correct keys to unset.

    Unfortunately, this will not remove any links via page buttons and the like, it only alters the menu bar structure on the left.

Topic Closed

This topic has been closed to new replies.

About this Topic