Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/cmake/2.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 如何在wordoress中使用带页面模板的userultra插件_Wordpress_Custom Wordpress Pages - Fatal编程技术网

Wordpress 如何在wordoress中使用带页面模板的userultra插件

Wordpress 如何在wordoress中使用带页面模板的userultra插件,wordpress,custom-wordpress-pages,Wordpress,Custom Wordpress Pages,我对wordpress的usersultra插件有问题 I have created a template page for search, but i only want to display it for the client who is logged in, how can i use usersultra for this case. Secondly when i check 'Only Logged in Users' checkbox in page settings it

我对wordpress的usersultra插件有问题

I have  created a template page for search, but i only want to display it for the client who is logged in, how can i use usersultra for this case.

Secondly when i check 'Only Logged in Users' checkbox in page settings it displays the content of my page and form of registration at the same time.

Please how can i resolve this problem.
编辑:

这是我所尝试的,但它不起作用

<?php echo do_shortcode("[usersultra_protect_content display_rule='logged_in_based'  custom_message_loggedin='Only Logged in users can see the content']

    <b>myfield :</b><?php the_field('myfield');?>

[/usersultra_protect_content]"); ?>

您可以通过此短代码执行此操作

<?php echo do_shortcode("[usersultra_protect_content display_rule='logged_in_based'  custom_message_loggedin='Only Logged in users can see the content']Your private content here [/usersultra_protect_content]"); ?>

如何在.php页面中使用此短代码。因为我使用的是我创建的自定义模板。它很有效。我真的很感激,愿真主保佑你。谢谢:),如果它对你有用,请将它标记为正确答案,这样它也会帮助其他用户:):@Ahemd Ginani我遇到了第二个问题,我如何在代码中添加字段。你可以使用:可选的\u字段\u在短代码中显示class='social'
<?php echo do_shortcode("[usersultra_protect_content display_rule='logged_in_based'  custom_message_loggedin='Only Logged in users can see the content']Your private content here [/usersultra_protect_content]"); ?>