Adaugare cod in WordPress theme dupa tagul body versiunea 5.2

WordPress are multe ‘hooks’ si cel mai recent adaugat in versiunea 5.2 este un hook prin care poti adauga cod imediat dupa tagul body din tema WordPress.

Modificare tema. In cazul in care tema nu este actualizata conform noului hook trebuie adaugat acest cod in tema imediat dupa body_class().

2019 11 05 094017

<?php wp_body_open(); ?>

Utilizare wp_body_open Hook.

Pentru a folosi hook-ul in functions.php al temei se foloseste urmatorul cod.

function add_code_to_body() {
     echo "Cod aici";
 }
 add_action( 'wp_body_open', 'add_code_to_body' );

 

Lasă un răspuns

Adresa ta de email nu va fi publicată. Câmpurile obligatorii sunt marcate cu *

Alte articole din aceiasi categorie

  • How Australia Covid - If you’re new to the world of bitcoin gambling, there’s no need to worry. The no-deposit bonus will allow you […]
  • New Online Casinos No Deposit - Ces machines peuvent être classées comme classiques, vidéo et progressives. Certaines de ces machines ont des jackpots valant des millions […]
  • locatie evenimente in natura Alegerea locației perfecte pentru evenimente în aer liber: Ghidul complet - Alegerea locației perfecte pentru evenimentele în aer liber poate fi o sarcină dificilă, dar cu informațiile potrivite și o planificare […]
  • Best New Online Casino Nz - Insurgent, online turn is not regulated and the privation of regularisation makes it unmanageable to cache tax revenues. Advertizement that […]
  • New Casino Online BR - In addition to ground computers, Brazilian players too use vagabondage devices to act their dearie casino games. Since mobile compatibility […]