I'm very new at wordpress and I'm trying to understand a code from a friend. I went to his wordpress account and edit some test page. However, the page has code inside [ ] tags. How can I edit it?
Here is an example from the wordpress wdit page:
<p style="text-align: center;"><strong>Test- #1 Business Communication App For Project Management & Task Management</strong></p>
<strong>Important Notice:</strong> If you accessed ....</strong></em>, in order for your account to be properly updated.
[register_form]
How can I open/edit the [register_form] code?
答案 0 :(得分:4)
这是来自插件或主题的shortcode。
修改强>
您可以在主题中进行编辑。如果短代码来自插件,则可以在functions.php
中覆盖它function say(){
return "Hello World";
}
add_shortcode( 'register_form', 'say' );
答案 1 :(得分:1)
是用于调用您已激活的某个插件的函数的标记。那个特定的标签我不知道插件是什么,我建议使用Contact Form 7,它很容易使用。
如果要创建PHP函数并在页面上使用它,请创建一个插件并根据需要声明调用。但!请小心,因为错误很小会损坏您的页面。
用于在wordpress上添加标签,来自你的插件。
function NAME_FUNCTION(){...}
add_shortcode( 'NAME_FUNCTION', 'NAME_TAG' );
并致电
[NAME_TAG]