wordpress网站中的外部表单
我已经用html/css/js/php构建了一个表单,我需要在wordpress站点中使用,但只有客户用户才能看到该表单。我如何控制用户是否登录?(会话或cookie)wordpress有一个内置函数来检测用户是否登录- 你可以这样使用它wordpress网站中的外部表单,wordpress,forms,custom-wordpress-pages,Wordpress,Forms,Custom Wordpress Pages,我已经用html/css/js/php构建了一个表单,我需要在wordpress站点中使用,但只有客户用户才能看到该表单。我如何控制用户是否登录?(会话或cookie)wordpress有一个内置函数来检测用户是否登录- 你可以这样使用它 if( is_user_logged_in() ) : // show form else : // Hide form, give other message etc. endif;
if( is_user_logged_in() ) :
// show form
else :
// Hide form, give other message etc.
endif;