Skip to content

Instantly share code, notes, and snippets.

@brunolimadevelopment
Created March 12, 2020 18:41
Show Gist options
  • Save brunolimadevelopment/8b46eeffb8e9d92ef65b7b8c8b8492fb to your computer and use it in GitHub Desktop.
Save brunolimadevelopment/8b46eeffb8e9d92ef65b7b8c8b8492fb to your computer and use it in GitHub Desktop.
[WP] Adicionando meta tags add_meta_tags()
/* Adicionando meta tags ao header */
function add_meta_tags() {
echo '<meta property="og:title" content="Titulo do seu site" />';
echo '<meta property="og:description" content="Descrição do meu site" />';
echo '<meta name="keywords" content="keyword1, keyword2,..." />';
echo '<meta property="og:type" content="website" />';
echo '<meta property="og:site_name" content="MeuSite" />';
echo '<meta property="og:image" content="logo_do_site.png" />';
}
add_action('wp_head', 'add_meta_tags');
// https://www.canalwp.com/codigos-wordpress/como-adicionar-meta-tags-no-header-do-wordpress-sem-plugin/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment