Typical WordPress Footer Codes

The WordPress footer, generated by the theme's footer template file (footer.php), is an ideal location for several codes, such as advertising and tracking codes. The third-party scripts usually load last in the footer, which prevents the content on your site from not displaying if there's an issue with the script.

  1. Advertising Codes

    • The WordPress footer is often the location for advertising codes, such as those required by in-text advertisers like Vibrant Media, Infolinks and Kontera. These codes generate the JavaScript necessary to display ads on the site. They may also be placed in the header template file.

    Tracking Codes

    • Tracking codes may be added to the WordPress footer, as well as the WordPress header. Analytics services such as Google Analytics and Quantcast use these codes to keep track of your site's visitors to determine how many unique visitors and page views you have.

    Site Information and Links

    • The WordPress footer often contains PHP code and HTML to generate site information and links. Site information may include the copyright notice, as well as the company or publisher's name. Common links included those to privacy policies, sitemaps and menus. RSS feed links may also appear in the WordPress footer.

    Editing the Footer Template

    • To edit the WordPress footer template, sign in to your site and click on "Appearance," and then click on "Editor." Click on the "Footer.php" file to open the footer template. Add the desired code to the footer template before the closing PHP tag, or manually edit the HTML that generates the site's information and links. Click on "Update" to save the changes to the footer.

Related Searches:

Resources

Comments

Related Ads

Featured