具体的实现方法可能会因您使用的主题而异,但这里有一个简单的插件wp_head
动作挂钩,并在标题中添加一些样式:
<?php
/**
* @package PACKAGE_NAME
*/
/*
Plugin Name: Plugin name
Plugin URI: https://plugin-website
Description: Plugin Description
Version: 1.0.0
Author: Plugin Author
Author URI: https://author-website
License: Plugin License
Text Domain: text-domain
*/
add_action( \'wp_head\', \'wpse321903_add_styles\' );
function wpse321903_add_styles(){ ?>
<style>
.page-title {
color: white;
}
</style><?php
}