Last active
December 21, 2023 18:51
-
-
Save estevan-ulian/f96351835db2a2a984f05f4d345d0693 to your computer and use it in GitHub Desktop.
Insere meta tags dentro do <head> do site Wordpress em função do id do post/pagina.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
add_action('wp_head', 'add_head_content'); | |
function add_head_content(){ | |
global $post; | |
$post_id = 123; | |
if($post->ID === $post_id) { | |
?> | |
<!-- código aqui --> | |
<?php | |
} | |
}; | |
?php> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment