当您安装 WordPress(install WordPress)时,最重要但有时被忽视的部分是网页底部的默认品牌页脚副本。
页脚通常包括法律免责声明的链接、版权信息和日期、隐私政策(privacy policy)和服务条款、联系方式和站点地图等元素。
页脚有助于改善用户体验、整体设计质量、提升访问者对您品牌的认知,并最大限度地提高参与度。如果您不编辑页脚文本以匹配您的品牌标识,那么对于访问您网站的任何人来说,它可能看起来不合适或不专业。
本指南涵盖了可用于在WordPress中编辑页脚的主要方法。
如何在 WordPress 中编辑页脚(How to Edit the Footer in WordPress)
对于大多数WordPress主题,编辑页脚是合法的。但是,如果您的网站有第三方主题,请务必阅读许可协议和文档,因为其中一些限制删除版权声明。
在您开始修改站点的页脚部分之前,请备份您的站点(backup your site),以便在出现任何错误时可以快速恢复它。
您可以使用以下方法在WordPress中编辑页脚:
- 主题定制器
- 页脚小部件
- 安装插件
- 编辑 footer.php 文件中的代码
如何通过主题定制器在 WordPress 中编辑页脚(How to Edit Footer in WordPress Via Theme Customizer)
主题定制(Theme Customizer)器是每个WordPress网站的一部分,您可以从WordPress管理面板或仪表板中的外观(Appearance)选项卡访问它。此WordPress功能允许您对网站进行多项更改,包括更改字体(changing fonts)、颜色、添加徽标,甚至编辑页眉和页脚部分。
- 要使用Theme Customizer在(Theme Customizer)WordPress中编辑页脚,请登录到您的 WordPress 管理面板(sign in to your WordPress admin panel)并选择外观(Appearance)。
- 选择自定义(Customize)。
- 转到主题设置(Theme Settings)。
- 接下来,选择页脚(Footer)。
- 用您的品牌副本替换(Replace)默认文本。
如何使用页脚小部件在 WordPress 中编辑页脚(How to Edit Footer in WordPress Using a Footer Widget)
如果您的 WordPress 主题在页脚部分有小部件(widget)区域,您可以使用小部件添加链接、文本、图像和法律免责声明。
- 要使用页脚小部件编辑页脚,请转到外观(Appearance)并选择小部件(Widgets)。
- 在页脚(Footer)小部件中,您可以添加反映您的品牌的页脚副本。
如何使用插件在 WordPress 中编辑页脚(How to Edit Footer in WordPress Using a Plugin)
您新安装的主题(WordPress plugins for your newly installed theme)有数千个WordPress 插件,您可以使用它们来扩展您网站的功能。
在这些插件中,有一个页脚插件,无需任何编码或其他技术经验(coding or other technical experience),即可轻松对WordPress网站进行细微或重大更改。
如果您的WordPress主题没有内置页脚插件,您可以使用第三方WordPress页脚插件,例如Remove Footer Credit。
- 要使用Remove Footer Credit插件编辑页脚,请安装并激活该插件。转到WordPress管理面板中的Tools设置,然后选择Remove Footer Credit。
- 在第一个文本字段中,输入要删除的文本,然后在第二个文本字段中添加页脚副本。完成后单击(Click) 保存(Save)。
如何使用 Footer.php 代码在 WordPress 中编辑页脚(How to Edit Footer in WordPress Using Footer.php Code)
footer.php 是一个WordPress模板文件,用于显示主题的页脚区域。编辑 footer.php 代码允许您用自定义页脚副本替换默认的WordPress主题页脚文本。
不建议直接编辑 footer.php 代码,尤其是在您不熟悉编码(if you’re not familiar with coding)的情况下。相反,您可以使用一些最佳实践,例如创建子主题、创建主题文件的备份以及在 footer.php 文件中注释代码。
注意(Note):这些说明适用于27 个 WordPress(Twenty Seventeen WordPress)主题。
- 要使用footer.php代码在(footer.php)WordPress中编辑页脚,请登录到您的WordPress管理面板,然后转到Appearance > Theme Editor。
- 接下来,从右窗格中选择主题。(theme)
- 转到主题文件(Theme Files)并找到主题页脚 (footer.php)。如果找不到它,请使用CTRL+F键盘快捷键。
- 找到这个 PHP 代码:
get_template_part( ‘template-parts/footer/site’, ‘info’ )
- 接下来,将PHP代码替换为下面的代码,并将“在此处添加文本”(“add text here”)替换为您自己的页脚文本。
//get_template_part( ‘template-parts/footer/site’, ‘info’ );
echo “在此处添加文字”;(echo “add text here”;)
?>
例如,如果我的页脚副本是“版权所有 2020(Copyright 2020) helpdeskgeek.com | 保留所有权利”,代码将是:
//get_template_part( ‘template-parts/footer/site’, ‘info’ );
echo “Copyright 2020 helpdeskgeek.com | All Rights Reserved”;
?>
- 使用您想要的页脚内容更改在此处添加文本,然后选择(Add Text Here)更新文件(Update File)以完成该过程。
如何将元素添加到 WordPress 页脚(How to Add Elements to the WordPress Footer)
如果您想将您的网站与第三方应用程序连接起来(connect your website with a third-party app),您可以将代码片段添加到WordPress页脚。
例如,您可以将Facebook、Instagram、Pinterest或YouTube等社交媒体按钮添加到您网站的页脚部分。只需(Just)获取您要添加的社交网络的脚本,然后将其粘贴到页脚部分。
或者,安装并激活允许您将脚本添加到页脚部分的插件。对此有帮助的插件之一是插入页眉和页脚(Insert Headers and Footers)插件。
为此,请安装并激活插入页眉(Insert Headers)和页脚(Footers)插件。将页脚代码复制(Copy)并粘贴到页脚中的(Footer)脚本部分(Scripts)。
(Save )在继续之前保存您的更改。
您还可以通过定制(Customizer)器将图像添加到页脚,或者将图像小部件拖放到页脚部分。
快速编辑您网站的页脚(Quickly Edit Your Site’s Footer)
编辑WordPress(WordPress)网站的页脚部分是您可以进行的各种主题增强功能之一。如果您有许多网站,这可能是一项耗时的工作,但它会在您的网站设计、导航和访问者的用户体验方面发挥重要作用。
您(Were)是否能够使用这些步骤在您的网站上编辑WordPress中的页脚?(WordPress)在评论中与我们分享。
How to Edit the Footer in WordPress
When you install WordPress, one of the most important, yet sometimes overlooked parts is the default branded footer copy at the bottom of your webpages.
The footer typically includes elements like links to legal disclaimers, copyright information and date, privacy policy and terms of service, contact details, and a sitemap.
The footer helps improve user experience, overall design quality, boost visitors’ perception of your brand, and maximize engagement. If you don’t edit the footer text to match your brand identity, it may seem out of place or unprofessional to anyone who visits your site.
This guide covers the main methods you can use to edit the footer in WordPress.
How to Edit the Footer in WordPress
For most WordPress themes, it’s legal to edit the footer. However, if you have a third-party theme for your site, make sure you read the license agreements and documentation as some restrict removal of copyright notices.
Before you can start modifying the footer section of your site, backup your site so that you can quickly restore it in case you make any errors.
You can edit the footer in WordPress using the following methods:
- Theme Customizer
- Footer Widgets
- Installing a plugin
- Editing the code in the footer.php file
How to Edit Footer in WordPress Via Theme Customizer
Theme Customizer is part of every WordPress site, and you can access it from the Appearance tab in the WordPress admin panel or dashboard. This WordPress feature allows you to make several changes to your site including changing fonts, colors, adding a logo, and even editing your header and footer sections.
- To edit the footer in WordPress using Theme Customizer, sign in to your WordPress admin panel and select Appearance.
- Select Customize.
- Go to the Theme Settings.
- Next, select Footer.
- Replace the default text with your branded copy.
How to Edit Footer in WordPress Using a Footer Widget
If your WordPress theme has a widget area in the footer section, you can use the widget to add links, text, images, and legal disclaimers.
- To edit the footer using the footer widget, go to Appearance and select Widgets.
- In the Footer widget, you can add the footer copy that reflects your brand.
How to Edit Footer in WordPress Using a Plugin
There are thousands of WordPress plugins for your newly installed theme that you can use to extend the functionality of your site.
Among these plugins is a footer plugin that makes it easy to make minor or major changes to your WordPress site without any coding or other technical experience.
If your WordPress theme has no built-in footer plugin, you can use a third-party WordPress footer plugin like Remove Footer Credit.
- To edit the footer using the Remove Footer Credit plugin, install and activate the plugin. Go to the Tools setting in your WordPress admin panel and select Remove Footer Credit.
- In the first text field, enter the text you want to remove, and then add your footer copy in the second text field. Click Save once you’re done.
How to Edit Footer in WordPress Using Footer.php Code
The footer.php is a WordPress template file that displays the footer area for your theme. Editing the footer.php code allows you to replace the default WordPress theme footer text with your custom footer copy.
It’s not recommended to edit the footer.php code directly, especially if you’re not familiar with coding. Instead, you can use some best practices such as creating a child theme, creating a backup of your theme files, and commenting the code in the footer.php file.
Note: These instructions apply for the Twenty Seventeen WordPress theme.
- To edit the footer in WordPress using the footer.php code, log in to your WordPress admin panel, and go to Appearance > Theme Editor.
- Next, choose the theme from the right pane.
- Go to Theme Files and locate the theme footer (footer.php). If you’re having trouble finding it, use the CTRL+F keyboard shortcut.
- Locate this PHP code:
get_template_part( ‘template-parts/footer/site’, ‘info’ )
- Next, replace the PHP code with the code below and replace “add text here” with your own footer text.
//get_template_part( ‘template-parts/footer/site’, ‘info’ );
echo “add text here”;
?>
For example, if my footer copy is “Copyright 2020 helpdeskgeek.com | All Rights Reserved”, the code would be:
//get_template_part( ‘template-parts/footer/site’, ‘info’ );
echo “Copyright 2020 helpdeskgeek.com | All Rights Reserved”;
?>
- Change Add Text Here with the content you want on your footer, and select Update File to complete the process.
How to Add Elements to the WordPress Footer
If you want to connect your website with a third-party app, you can add code snippets to the WordPress footer.
For example, you can add social media buttons like Facebook, Instagram, Pinterest or YouTube to your site’s footer section. Just take the script of the social network you want to add, and then paste it into the footer section.
Alternatively, install and activate a plugin that allows you to add the script to the footer section. One of the plugins that helps with this is the Insert Headers and Footers plugin.
To do this, install and activate the Insert Headers and Footers plugin. Copy and paste the footer code into the Scripts in Footer section.
Save your changes before moving on.
You can also add an image to the footer through the Customizer, or by dragging and dropping the image widget to the footer section.
Quickly Edit Your Site’s Footer
Editing the footer section of your WordPress site is one of the various theme enhancements you can make. It can be a time-consuming job if you have many sites, but it makes all the difference in your site’s design, navigation, and the user experience for your visitors.
Were you able to edit the footer in WordPress on your site using any of these steps? Share with us in a comment.