Skip to content

Instantly share code, notes, and snippets.

@estevan-ulian
Last active December 21, 2023 18:51
Show Gist options
  • Save estevan-ulian/f96351835db2a2a984f05f4d345d0693 to your computer and use it in GitHub Desktop.
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.
<?
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