Head, Footer and Post Injections

Descripción

Why you have to install 10 plugins to add Google Analytics, Facebook Pixel, custom
tracking code, Google DFP code, Google Webmaster/Alexa/Bing/Tradedoubler verification code and so on…

With Header and Footer plugin you can just copy the code those services give you
in a centralized point to manage them all. And theme independent: you can change your theme
without loosing the code injected!

Puntos de inyección y características.

  • in the page section where most if the codes are usually added
  • just after the tag as required by some JavaScript SDK (like Facebook)
  • in the page footer (just before the tag)
  • recognize and execute PHP code to add logic to your injections
  • distinct desktop and mobile injections

AMP

A new AMP dedicated section compatible with AMP plugin lets you to inject specific codes in
AMP pages. Should be ok even with other AMP plugins.

Post Top and Bottom Codes

¿Necesitas incluir un banner sobre el contenido de la entrada o después de esta? No hay problema. Con «Header and Footer» puedes hacerlo:

  • Add codes on top, bottom and in the middle of posts and pages
  • Differentiate between mobile and desktop (you don’t display the same ad format on both, true?)
  • Separate post and page configuration
  • Código PHP nativo activado
  • Shortcodes activados

Inyecciones especiales

  • Justo después de la etiqueta BODY de apertura
  • In the middle of post content (using configurable rules)
  • En todas las partes en la plantilla (usando marcadores de posición)

bbPress

The specific bbPress injections are going to be removed. Switch to my
Ads for bbPress, which is more flexible and complete.

Límites

This plugin cannot change the menu or the footer layout, those features must be covered by your theme!

Página oficial: Header and Footer.

Otros plugins por Stefano Lissa:

Translation

You can contribute to translate this plugin in your language on WordPress Translate

Privacidad y GDPR

Este plugin no almacena o procesa ningún dato personal del usuario.

Instalación

  1. Put the plugin folder into [wordpress_dir]/wp-content/plugins/
  2. Go into the WordPress admin interface and activate the plugin
  3. Optional: go to the options page and configure the plugin

Preguntas frecuentes

FAQs are answered on Header and Footer page.

Reseñas

3 de diciembre de 2025
Has been my go-to header/footer injection plugin for years, works great and is consistently updated.
9 de octubre de 2025
I’ve been using this a few years and I really appreciate the efficiency of it.
4 de agosto de 2025
This is a great plugin for when you need something a little less common added to your site, like a custom cookie function, or even some off the beaten track analytics etc.
12 de junio de 2025
The plugin was working fine, but suddenly one day it corrupted my website. It started appearing as dangerous on Google search, with warnings about fraud, and eventually began showing ads instead of my actual site content. I thought it was malware, so I restored backups, but the problem persisted. I then decided to deactivate all plugins and reactivate them one by one, until I got to this one and realized it was the culprit. It gave me a huge scare and cost me a lot of time. I will not be using this plugin again.
Leer todas las 734 reseñas

Colaboradores y desarrolladores

«Head, Footer and Post Injections» es un software de código abierto. Las siguientes personas han colaborado con este plugin.

Colaboradores

«Head, Footer and Post Injections» ha sido traducido a 11 idiomas locales. Gracias a los traductores por sus contribuciones.

Traduce «Head, Footer and Post Injections» a tu idioma.

¿Interesado en el desarrollo?

Revisa el código , echa un vistazo al repositorio SVN o suscríbete al registro de desarrollo por RSS.

Registro de cambios

3.3.1, 3.3.2

Breaking changes (see below)

  • Disabled by default PHP on multisite installations
  • Added constant HEADER_FOOTER_MULTISITE_ALLOW_PHP to be used on wp-config.php to enable PHP on multisite installations
  • Added constant HEADER_FOOTER_ALLOW_PHP to be used on wp-config.php to enable PHP (true by default for compatibility)

3.3.0

  • Fixed readme

3.2.9

  • WP 6.7.1 check

3.2.8

  • WP 6.5.2 check

3.2.7

  • Added Custom Post Types

3.2.6

  • Fixed PHP short open tag

3.2.5

  • Removed obsolete code
  • Escaped added to fixed and translated strings

3.2.4

  • Possible security fix

3.2.3

  • Updated meta information

3.2.2

  • Fixed a couple of links in readme.txt
  • Updated compatibility with WP 5.7

3.2.1

  • Fixed a PHP notice on admin side when creating a new page

3.2.0

  • Restored controls of per post injection
  • Compatibility check with latest WP
  • Moved to PHP 5.6 syntax

3.1.6

  • Fixed check_admin_referrer action

3.1.5

  • Fixed wrong injection in amp pages

3.1.4

  • Performance optimization
  • Removed obsolete code
  • Improved AMP support
  • (Temporary) removed metaboxes (they were not working anyway)

3.1.3

  • Verificación de compatibilidad general con el último WP

3.1.2

  • Se corrigió un aviso de depuración

3.1.1

  • Sección de privacidad en el archivo readme.txt

3.1.0

  • Removed the Facebook setting (move to a specialized plugin to have the Facebook Open Graph Meta)
  • Removed bbPress setting (please use bbpress ads)
  • Label fix
  • Avisos eliminados
  • 5 post injections and 5 generic injections