如何在wordpress中使用带有页面模板的userultra插件
How to use userultra plugin with page template in wordoress
我对 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]"); ?>
您可以对这个短代码执行此操作,
<?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/
我对 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]"); ?>
您可以对这个短代码执行此操作,
<?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/