龙空技术网

GeneratePress:2种方法更改版权信息

谷G匠人 123

前言:

此时看官们对“php滤html”大约比较关心,你们都需要剖析一些“php滤html”的相关文章。那么小编也在网上网罗了一些对于“php滤html””的相关资讯,希望看官们能喜欢,同学们快快来学习一下吧!

本文讲解两种方法,一种付费,一种免费,以便你可以在GeneratePress主题中编辑版权信息。

付费的方法是使用GP Premium 中的版权功能,来更改网站页脚中的版权信息。

使用版权功能

首先,确保在外观 > GeneratePress 下激活了版权功能

然后您可以在Customize > Layout > Footer中找到版权设置。

使用函数

如果您没有 GP Premium,则可以改用函数。此功能至少需要 GeneratePress 1.3.42版本。

使用Code Snippet插件向网站里添加如下PHP代码段即可。

add_filter( 'generate_copyright','tu_custom_copyright' ); function tu_custom_copyright() { ?> Your new message in here. You can add anything you want, including PHP and HTML. <?php }

删除整个页脚栏

您还可以使用一个简单的功能删除整个页脚区域,同样需要使用Code Snippet插件。

add_action( 'after_setup_theme', 'tu_remove_footer_area' ); function tu_remove_footer_area() { remove_action( 'generate_footer','generate_construct_footer' ); }

标签: #php滤html