Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
wordpress网站中的外部表单_Wordpress_Forms_Custom Wordpress Pages - Fatal编程技术网

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;

我已经用html/css/js/php构建了一个表单,我需要在wordpress站点中使用,但只有客户用户才能看到该表单。我如何控制用户是否登录?(会话或cookie)

wordpress有一个内置函数来检测用户是否登录-

你可以这样使用它

if( is_user_logged_in() ) :
    // show form
else :
    // Hide form, give other message etc.
endif;