Products
GG网络技术分享 2025-03-18 16:12 2
I create a custom payment for WordPress, is a simple code but I need to hide the code, I thought about creating a shortcode [custom_shorcode].
When I put the shortcode i need to display a custom html with php.
图片转代码服务由CSDN问答提供
感谢您的意见,我们尽快改进~
功能建议我为WordPress创建自定义付款,是一个简单的代码,但我需要隐藏代码,我想创建 一个短代码[custom_shorcode]。</ p>
当我输入短代码时,我需要用php显示一个自定义的html。</ p>
</ div>
You can do this in the functions.php or a simple Plugin.
To create it in the functions.php of your child-theme, do it like this:
add_shortcode(\'your-shortcode\', \'yourFunction\');function yourFunction(){
//do your stuff
}
You can find the documentation here
Demand feedback