plugin development - Unable to change footer using wp_footer action hook

I am learning Wordpress from a book and while learning about how to useaction hooks the author gives the below code .

I am learning Wordpress from a book and while learning about how to use action hooks the author gives the below code . I am assuming this would change the footer at the front end .

<?php
function boj_example_footer_message() {
echo 'This site is built using < a href=""
title=”WordPress publishing platform” > WordPress < /a > .';
}
add_action( 'wp_footer', 'boj_example_footer_message', 100 );

?>

To test this out I created a plugin and had the above code put in the main plugin file . However , upon activation I get

"The plugin generated 8 characters of unexpected output during activation. "

What causes this ? What is the correct way to echo to the front end on an action hook ? How to make this work ?

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745182633a4615489.html

相关推荐

  • plugin development - Unable to change footer using wp_footer action hook

    I am learning Wordpress from a book and while learning about how to useaction hooks the author gives the below code .

    5小时前
    40

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信