我已查看有关更改页脚内版权的说明,目前设置为:
©2014 Toronto Booze Hound。由XtremelySocial和Blacktie主题。
我在过去发现了更改此说明,但对此代码进行了更改:
add_filter('xsbf_credits', 'xsbf_child_credits');
function xsbf_child_credits ( $site_credits ) {
$theme = wp_get_theme();
$site_credits = sprintf( __( '© 2014 - %1$s %2$s'),
date ( 'Y' ),
'<a href="' . esc_url( home_url( '/' ) ) . '" rel="home">' . get_bloginfo( 'name' ) . '</a>'
);
return $site_credits;
}
似乎没反映在页面上。
以下是作者在代码中的注释:
/*
* OVERRIDE THE SITE CREDITS TO GET RID OF THE "THEME BY XTREMELYSOCIAL" AND JUST LEAVE
* COPYRIGHT YOUR SITE NAME
*
* You can hard-code whatever you want in here, but its better to have this function pull
* the current year and site name and URL as shown below.
*/
我可能没有完全理解php。最终目标是将其改为简单:
2014 - ($ currentDate)Toronto Booze Hound
实现这一目标的最简单方法是什么?
网站为https://torontoboozehound.com
我确实知道同时使用wpsupercache和cloudflare会让更改花费一些时间,但我清除插件中的缓存并将cloudflare置于开发人员模式以及使用隐身模式查找更改。
感谢。
答案 0 :(得分:0)
简单方法
转到footer.php文件并删除:
Theme by %3$s. (line 63)
'<a href="' . $theme->get( 'ThemeURI' ) . '" rel="profile" target="_blank">' . $theme->get( 'Author' ) . '</a>' (line 66)
应该以这种方式结束:
$site_credits = sprintf( __( '© %1$s %2$s.', 'flat-bootstrap' ),
date ( 'Y' ),
'<a href="' . esc_url( home_url( '/' ) ) . '" rel="home">' . get_bloginfo( 'name' ) . '</a>',
);
它应该有用。