In the WordPress site.footersis an important part, usually used to showCopyright Information,privacy policy,terms of servicecap (a poem)Contact Informationetc. By default, many WordPress themes automatically generate footer copyright information such as "© 2024 Powered by WordPress" and so on, but this information often needs to be customized to the actual type of your sitecompilerThe
I. Modify footer copyright information through theme settings
many ofWordPress ThemesBoth have built-in footer copyright information forcustomizableoptions, especially for advanced topics such asAvada,WoodMartcap (a poem)AstraThe theme can be modified through a simple interface operation. Other themes need to be customized according to thethe real situation, but basically they're all pretty much the same.
1. Check the footer options that come with the theme
- Log in to the WordPress backend and click on theexterior condition > customizable, enter the theme customization interface.
The footer of a theme like Astra is integrated in this location. (Because Astra goes for lightweight, his theme settings page is all in one piece).
- locateFooter Settingsmaybefooter copyrightrelated options (the location may vary from theme to theme), which are usually found in thecustomizablemaybeTheme OptionsListed in.
Woodmart ThemeIt's integrated in theTheme Settingin (it's easier for newbies to operate).
Avada ThemeAlso integrated in theTheme SettingIt's just that the location hasmake a distinction, in the layout of theFooter LayoutThe
- In this interface, you can modify the copyright information text and add customized content such as company name, website link, etc.
WoodmartThe topic is to change the # symbol to the correct adjustment link
Avada ThemeJust set up a content section directly, adding content and hyperlinks are the same.
- After making changes, clickpostbutton to save the changes.
2. Other customizations in theme settings
Some themes may allow you to modify the footer content through the theme options panel. TakeWoodMartAs an example:
- In the WordPress backend find theWoodMart > Theme Setting > footersPart.
- You can find it at "Footer Copyright Information"Enter customized copyright information in the text box. HTML tags are supported so that you can embed links, bold text, and other effects.
II. Modifying footer copyright information through code
If your theme doesn't offer the option to customize the footer, or if you want more precise control over how the footer is displayed, you can do so by modifying the theme files.
1. Modifying the footer with a child theme
Remember it must be a sub-topic
It is recommended that when modifying the codeUsing child themesThis will prevent the custom code from being overwritten when the theme is updated. The specific operation is as follows:
- Creating subtopics(if not already created):
- In the WordPress root directory of the
wp-content/themes/
folder to create a child theme folder.
- In the WordPress root directory of the
- Create a
style.css
cap (a poem)functions.php
file with thestyle.css
Add information about the subtopic in the - Modify the subtopic's
footer.php
file::- Find the subject of the
footer.php
file, where there is usually a function or HTML code for displaying footer copyright information. - commander-in-chief (military)
footer.php
The file is copied to the child theme folder and edited.
- Find the subject of the
- Find similar
<?php echo date('Y'); ?>
maybethe_author()
code and modify it to customize the content.
Example:
<div class="site-info">
<p>© MyWebsite. All Rights Reserved. | Designed by <a href="https://yourlink.com">Your Company</a></p>
</div>
- Save and upload files: When you are done editing, save the file and upload it to the corresponding child theme folder in the server.
2. In functions.php
Modify the footer in
If you don't want to edit directly footer.php
file, which can be accessed via the functions.php
Add a filter to modify the footer copyright information.
Please remember to remember.spaceOne line, joincoding. So that laterrun through a checklist, if it's stuck together, you may not be able to drain it later.
function custom_footer_credits() {
return '© ' . date('Y') . ' MyWebsite. All Rights Reserved. | Powered by <a href="https://wordpress.org">WordPress</a>';
}
add_filter( 'storefront_credit', 'custom_footer_credits' );
This code willdynamic update (Internet)year and replaces the defaultcopyrightInformation.
Third, use the plug-in to modify the footer copyright information
If you're not familiar with the code, or your theme doesn't offer direct customization options, you can also use plugins to modify the footer information. Here are the recommended plugins and their usage:
1. Remove Footer Credit plugin
- Installation and activation Remove Footer Credit Plug-ins.
- In the WordPress backend click onartifact > Remove Footer CreditThe
- In the text box on the plugin settings page, enter the default footer text you want to remove, and the new content you want to replace.
- Save the settings and head over to the website preview to see the results.
2. Insert Headers and Footers plugin
If you wish to add the footerJavaScript codeor otherintricateelement, you can use the Insert Headers and Footers Plug-ins.
- Install and activate the plugin.
- locateCode Snippets > Header & FooterThe
- In the box in the "Script Input" section, enter the content you want to add (HTML and JavaScript code are supported).
- strike (on the keyboard)save (a file etc) (computing), finish adding the footer content.
IV. Suggestions for modifying copyright information in the footer
1. Keep it simple and clear
Footer information should be concise and clear, avoiding too much unnecessary text. Recommended things to include are:
- Copyright year (use dynamic year code to ensure automatic updates).
- Website type or brand or website name.
- Web links or useful links.
- Privacy Policy or Terms of Service link.
2. Use of dynamic year codes
To avoid manually updating the copyright year every year, it is recommended to use dynamic year code. Below is a simple PHP code example that automatically displays the current year:
© MyWebsite. All Rights Reserved.
3. Ensuring compliance with legal requirements
Ensure that the footer copyright information contains the necessary privacy policy, terms of service, etc., as required by the laws of your region, and in particular when it comes to GDPR compliance, these links should be clearly displayed. (These terms and conditions and copyright information must be present if you need to file)
4. Optimize SEO and User Experience
The footer, although located at the bottom of the page, has a link structure that can affectSEO. By means of a rationalinternal linkSettings that enhance user experience and help search engines crawl betterSite structure. (Footer optimization is also very conducive to search engine retrieval of your site, the footer can not be perfunctory)
V. Advantages and disadvantages of modifying footer copyright information
Pros:
- Enhance brand image: A custom footer can showcase the overall professional image of your website and make it look more personalized.
- Increase user trust: Copyright information that includes the company name and a legitimate copyright statement enhances the user's trust in the site.
- Dynamic updates reduce maintenance: Update the code through the automated year to avoid the hassle of manual changes each year.
Drawbacks:
- Theme Support Restrictions: Some free themes don't offer footer customization options and may require manual code changes or rely on plugins.
- Plug-ins may affect performance: While plugins are easy to use, too many of them may affect site performance and speed.
summarize
Modifying the footer copyright information in a WordPress theme can be accomplished in a number of ways, whether it's through theTheme Setting, modify the code manually, or use a plugin.Prioritize theme settings before plugins or code, ensuring that footer information is consistent with website information and meets legal compliance requirements. With proper customization, you can not only enhance the professionalism of your website, but also simplify future maintenance. Plugins are a good alternative if you're unfamiliar with code, and for users with coding experience, theCustom Codewill provide greater flexibility and control.