我对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]"); ?>
它只显示文字而不是值。
编辑2:
它与Ahmed提供的代码一起使用
<?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>".the_field('myfield')."
[/usersultra_protect_content]"); ?>
答案 0 :(得分:1)
你可以通过这个短代码
来做到这一点<?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]"); ?>
短文代码列在文档页面上:https://usersultra.com/userultra/