允许限时提交问卷的 Wordpress 问卷插件
Wordpress questionnaire plugin that allows for limited time to submit questionnaire
您好,有人想 post 在他们的网站上播放视频,然后有一份调查问卷,他们的客户必须在观看视频后回答。棘手的部分是他们希望在观看视频后的有限天数内回答问卷。寻找插件/解决方案
扩展我上面的评论。我会通过 cookie 来做到这一点(例如 30 天)。这应该 运行 在你的 functions.php 文件中:
function questionnaire() {
//if you are on the video page and there is no cookie, then set it
if(is_page('videopage') && !isset($_COOKIE["videoView"])) {
setcookie("videoView", "Viewed the video", time()+30*24*60*60);
// else if you're on the questionnaire page and there's no cookie, then redirect the user
} elseif (is_page('questionnairepage') && !isset($_COOKIE["videoView"]) {
wp_redirect( 'videopage' );
exit;
}
}
add_action( 'init', 'questionnaire' );
您好,有人想 post 在他们的网站上播放视频,然后有一份调查问卷,他们的客户必须在观看视频后回答。棘手的部分是他们希望在观看视频后的有限天数内回答问卷。寻找插件/解决方案
扩展我上面的评论。我会通过 cookie 来做到这一点(例如 30 天)。这应该 运行 在你的 functions.php 文件中:
function questionnaire() {
//if you are on the video page and there is no cookie, then set it
if(is_page('videopage') && !isset($_COOKIE["videoView"])) {
setcookie("videoView", "Viewed the video", time()+30*24*60*60);
// else if you're on the questionnaire page and there's no cookie, then redirect the user
} elseif (is_page('questionnairepage') && !isset($_COOKIE["videoView"]) {
wp_redirect( 'videopage' );
exit;
}
}
add_action( 'init', 'questionnaire' );