• Hola de tanto buscar logre conseguir armarme un header pero no se si esta bien redactado? ya que en Meta Descripción e Image metí código php y nose si para el SEO me convendría ponerlo en functions.php y llamarlo de alguna forma. o si hay algún código mas simple como el resto?

    <!DOCTYPE html>
    <html <?php language_attributes(); ?>>
     <head>
       <meta charset="utf-8"/>
       <title><?php is_front_page() ? bloginfo('description') : wp_title(''); ?></title>
       <meta charset="<?php bloginfo( 'charset' ); ?>">
       <meta name="viewport" content="width=device-width, initial-scale=1.0">
    	 
    	
    		<!-- Open Graph data -->
         <meta property="og:type" content="article" />
    	 <meta property="og:url" content="<?php the_permalink() ?>"/>
    	 <meta property="og:title" content="<?php single_post_title(''); ?>" /> 
    	 <meta property="og:image" content="<?php if (function_exists('wp_get_attachment_thumb_url')) {echo wp_get_attachment_thumb_url(get_post_thumbnail_id($post->ID)); }?>" />
    	
    	  <?php if (have_posts()):while(have_posts()):the_post();endwhile;endif;?>
    <?php if (is_single()) { ?> 
        <meta property="og:description" content="<?php echo strip_tags(get_the_excerpt($post->ID)); ?>" />	
    <?php } else { ?> 
        <meta property="og:description" content="<?php bloginfo('description'); ?>" />
    <?php } ?>
    	 
    	 <!-- Twitter Card data -->
    <meta name="twitter:card" value="summary" />
    <meta name="twitter:url" value="<?php the_permalink() ?>" />
    <meta name="twitter:title" value="<?php single_post_title(''); ?>" />
    <meta name="twitter:image" value="<?php if (function_exists('wp_get_attachment_thumb_url')) {echo wp_get_attachment_thumb_url(get_post_thumbnail_id($post->ID)); }?>" />
    <meta name="twitter:site" value="@mitwitter" />
    <meta name="twitter:creator" value="@mitwiiter" /> 
    	  <?php if (have_posts()):while(have_posts()):the_post();endwhile;endif;?>
    <?php if (is_single()) { ?> 
        <meta name="twitter:description" value="<?php echo strip_tags(get_the_excerpt($post->ID)); ?>" />	
    <?php } else { ?> 
        <meta name="twitter:description" value="<?php bloginfo('description'); ?>" />
    <?php } ?>
     
    	 
    	 
    	 
    	 
       <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>">
    	 <!-- Chrome, Firefox OS y Opera -->
    <meta name="theme-color" content="#0178bc"/>
    <!-- Windows Phone -->
    <meta name="msapplication-navbutton-color" content="#0178bc"/>
    	<link href="http://35.239.68.63/wp-content/uploads/faviconok.png" rel="icon" type="image/x-icon" />
    	 
    	 
       <?php wp_head(); ?>
     </head>
Viendo 2 respuestas - de la 1 a la 2 (de un total de 2)
  • Moderador Fernando Tellado

    (@fernandot)

    Ponerlo en el tema o en funciones es irrelevante en principio para el SEO, pero no para escalabilidad del sitio.

    Si el tema es solo para ti entonces da igual pero si quieres usarlo con otras instalaciones igual es mejor que lo pruebes en funciones, con plugins de SEO instalados para ver si no se duplican tags, etc.

    Iniciador del debate dbeze

    (@dbeze)

    Hola gracias por responder el sitio lo empece a crear desde cero y sin plungis por eso consulto. Voy a tratar de hacerlo desde functions o si lo dejo asi no le faltaria nada?

Viendo 2 respuestas - de la 1 a la 2 (de un total de 2)
  • El debate ‘Duda con el header’ está cerrado a nuevas respuestas.