extend wordpress session into main domain

前端 未结 2 1301
故里飘歌
故里飘歌 2021-01-23 21:45

I have a site that uses wordpress for community purposes, it is installed under subdirectory \"mysite/community\" but when I try to call wordpress functions into \"mysite\" I ca

2条回答
  •  耶瑟儿~
    2021-01-23 22:26

    Cookies can contain a Path, this is probably what you are looking for: http://codex.wordpress.org/Editing_wp-config.php#Additional_Defined_Constants

    To allow the cookie for all path on the domain, use define('COOKIEPATH',"/");.

    You can also set the cookie domain in wp-config.php: http://codex.wordpress.org/Editing_wp-config.php#Set_Cookie_Domain

    Use ".example.com" to allow the cookie for all subdomains of example.com.

提交回复
热议问题