0
自分のスタイルをすべてのページに貼り付ける簡単なプラグインを作りたいと思っています。 これは私のコードです:私のWordPressのプラグインがうまくいかない理由
<?php
/*
Plugin Name: Super Plugin
*/
function mr_scripts() {
wp_register_style('forms', plugins_url('forms.css', __FILE__));
wp_enqueue_style('forms', plugins_url('', __FILE__));
echo '/* style-echo */ <style>
.social-icons{display:none!important;}
</style>';
}
add_action('wp_enqueue_scripts', 'mr_scripts', 99);
?>
プラグインが有効になります。残念ながら私は私のウェブサイトの変更を見ていない。この問題を解決するのを手伝ってください。
非常に有用だったこと、ありがとうございました! – milosz