How to remove or edit the copyright footer of wordpress for Spacious theme
到 WordPress 網站後台的 “佈景主題編輯檔案器” 找到下面內容
Spacious: functions.php (inc/functions.php)
找544~565行
/*********************************************************************/
/**
* function to show the footer info, copyright information
*/
if ( ! function_exists( ‘spacious_footer_copyright’ ) ) :
function spacious_footer_copyright() {
$site_link = ‘<a href=”‘ . esc_url( home_url( ‘/’ ) ) . ‘” title=”‘ . esc_attr( get_bloginfo( ‘name’, ‘display’ ) ) . ‘” ><span>’ . get_bloginfo( ‘name’, ‘display’ ) . ‘</span></a>’;
$wp_link = ‘<a href=”‘ . esc_url( ‘https://wordpress.org’ ) . ‘” target=”_blank” title=”‘ . esc_attr__( ‘WordPress’, ‘spacious’ ) . ‘” rel=”nofollow”><span>’ . __( ‘WordPress’, ‘spacious’ ) . ‘</span></a>’;
$tg_link = ‘<a href=”‘ . esc_url( ‘https://themegrill.com/themes/spacious’ ) . ‘” target=”_blank” title=”‘ . esc_attr__( ‘Spacious’, ‘spacious’ ) . ‘” rel=”nofollow”><span>’ . __( ‘Spacious’, ‘spacious’ ) . ‘</span></a>’;
$default_footer_value = sprintf( __( ‘Copyright © %1$s %2$s.’, ‘spacious’ ), date( ‘Y’ ), $site_link ) . ‘ ‘ .__(‘All rights reserved.’, ‘spacious’ ). sprintf( __( ‘ Theme %1$s’, ‘spacious’ ), $tg_link ) . ‘ ‘ . sprintf( __( ‘by ThemeGrill. Powered by: %2$s.’, ‘spacious’ ), ‘Spacious’, $wp_link );
$spacious_footer_copyright = ‘<div class=”copyright”>’ . $default_footer_value . ‘</div>’;
echo $spacious_footer_copyright;
}
endif;
add_action( ‘spacious_footer_copyright’, ‘spacious_footer_copyright’, 10 );
/********************************************************************/
底下是說明上面要修改的部份:
1.修改其中URL 與 倒數第2個 spacious
$tg_link = ‘<a href=”‘ . esc_url( ‘https://themegrill.com/themes/spacious’ ) . ‘” target=”_blank” title=”‘ . esc_attr__( ‘Spacious’, ‘spacious’ ) . ‘” rel=”nofollow”><span>’ . __( ‘Spacious’, ‘spacious’ ) . ‘</span></a>’;
2.底下修改 ThemeGrill
$default_footer_value = sprintf( __( ‘Copyright © %1$s %2$s.’, ‘spacious’ ), date( ‘Y’ ), $site_link ) . ‘ ‘ .__(‘All rights reserved.’, ‘spacious’ ). sprintf( __( ‘ Theme %1$s’, ‘spacious00000’ ), $tg_link ) . ‘ ‘ . sprintf( __( ‘by ThemeGrill. Powered by: %2$s.’, ‘spacious’ ), ‘Spacious’, $wp_link );
20231112更新:
上面這行若改為這樣:
$default_footer_value = sprintf( __( ‘Copyright © %1$s %2$s.’, ‘spacious’ ), date( ‘Y’ ), $site_link ) . ‘ ‘ .__(‘All rights reserved.’, ‘spacious’ ). sprintf( __( ‘%1$s’, ‘spacious’ ), $tg_link ) . ‘ ‘ . sprintf( __( ‘%2$s’, ‘spacious’ ), ‘Spacious’, $wp_link );
代表直接去掉多餘說明文字
只剩下:
Copyright © 2066 人類命運共同體基金會. All rights reserved.
3.修改底下 URL與句末之WordPress文字
$wp_link = ‘<a href=”‘ . esc_url( ‘https://wordpress.org’ ) . ‘” target=”_blank” title=”‘ . esc_attr__( ‘WordPress’, ‘spacious’ ) . ‘” rel=”nofollow”><span>’ . __( ‘WordPress’, ‘spacious’ ) . ‘</span></a>’;
參考:
如何移除/編輯wordpress頁尾的版權? How to remove/edit the copyright footer of wordpress?
另外:
[WordPress] 外掛分享: Hide Footer Links
不一定要用 能不用最好
又另外:
外掛程式 Login Designer 可以修改wordpress的登陸和註冊頁面LOGO,可以修改頁面的樣式、背景.
发表回复