我正在尝试玩Hello插件。我要那个插件在前端工作。能把哈罗·多莉带到前端吗?或者这会影响我现有的网站吗?
发布于 2016-10-24 08:30:16
在主题中,在要显示输出的模板中添加自定义操作:
do_action( 'show_lyrics' );这对自己没有任何好处。现在,您可以将函数hello_dolly添加为functions.php中该操作的回调:
if ( function_exists( 'hello_dolly' ) ) {
add_action( 'show_lyrics', 'hello_dolly' );
}https://wordpress.stackexchange.com/questions/243713
复制相似问题