我想使用插件在每个 wordpress 页面的页面标题后打印“Hello World”。我可以从主题文件夹中的 page.php 中做到这一点,但我想使用插件来做到这一点。先感谢您。
<?php
/*
Plugin Name: Display Data
Plugin URI: https://rb.com
Description: My Plugin Dev.
Version: 0.1
Author: RB
*/
function printData()
{
if(THIS IS A PAGE)
{
echo "Hello World";
}
else
{
echo "This is not a Page";
}
}
add_action('DONT KNOW WHAT SHOULD BE HERE','printData');
?>