footer の変更
-
footerの部分を変更したいのですが、またしても別のタイプのもので、今回も困っています。
毎回のことで申し訳ないのですが、どなたか助けていただけないでしょうか。
前回はfooter.phpとテーマのための関数に書き込む方法を教えていただきました。
今回は、どういう構造になっているのでしょうか?
単純に、書き加えられないようになっていると思いますが。
私のサイトは、
http://test.gardenplant.org
です。
変更したいところは、
Copyright © 2016 · GeneratePress
です。
宜しくお願いします。
-
Theme Authorの書き込みを見つけました。
WordPress › Support » Edit footer
To change the copyright, you need to add a function to either your child theme’s functions.php file, or you need to pop the code in a new plugin you can create with this awesome plugin: https://wordpress.org/plugins/pluginception/
This is the code: https://gist.github.com/generatepress/36c0c52479679252af28
従って、codeに書かれていた以下をfunction.phpにコピーアンドペーストして、自分に必要な文言を Your new message in here に書き直して完了しました。
add_action(‘after_setup_theme’,’generate_copyright_remove_default_message’);
function generate_copyright_remove_default_message()
{remove_action( ‘generate_credits’, ‘generate_add_footer_info’ );
remove_action( ‘generate_copyright_line’,’generate_add_login_attribution’ );
}/**
* Add the custom copyright
* @since 0.1
*/
add_action(‘generate_credits’,’generate_copyright_add_custom_message’);
function generate_copyright_add_custom_message()
{
?>
Your new message in here
<?php
}
トピック「footer の変更」には新たに返信することはできません。