Home › Forum › Problemi Vari con WP › modifica al codice sorgente homepage tema coffee desk
-
AutorePost
-
-
30 Luglio 2012 alle 17:17 #22265apache72Partecipante
tramite l’analizzatore seo di bing, ho scoperto di avere 2 tag h1 sulla mia pagina home e che dovrei rimuoverne uno.
come si modifica il codice sorgente?
premesso che nell’editor del mio tema coffee desk non ho trovato NESSUN file che contenesse il codice sorgente che si visualizza cliccando con tasto destro sulla home.
-
30 Luglio 2012 alle 17:38 #96919TittiModeratore
PHP è un linguaggio lato server, non vedi il codice dal browser cliccando con il tasto dx
Cmq non hai bisogno di togliere niente nella tua homepage, va bene cosà¬
-
30 Luglio 2012 alle 18:10 #96920apache72Partecipante
Grazie Titti sei stata fulminea! Il problema è questo:uno dei tag h1 è
e l’altro è
secondo l’analisi dovrei eliminarne uno, tu credi quindi che non ci sia bisogno?
In ogni caso, se dovesse capitare ancora che ho bisogno di modificare quindi come dovrei? detto in soldoni. perchè non ho capito bene…
-
31 Luglio 2012 alle 10:52 #96939TittiModeratore
Sà¬, dovresti eliminarne uno (il primo ad esempio, che mi sembra vuoto) andando a cercare il tag <h1></h1> nel file corrispondente alla tua home page. Il problema è che se non sai dove mettere le mani rischi di fare danni maggiori, può essere facile come un po’ più complicato.
Ogni tema è diverso, da qui non riesco a dirti cosa togliere. Il consiglio è di farlo fare a qualcuno che sappia metterci le mani, oppure di fare delle prove in locale o su un sito di test, oppure chiedere all’autore del tema come fare.
Se hai fatto qualche modifica nel file header (o simili) il consiglio invece è quello di rimettere su il file originale, probabilmente hai aggiunto l’immagine del logo.
-
31 Luglio 2012 alle 14:07 #96946San PietroburgoPartecipante
Potrebbe anche essere che il tema utilizzato abbia una sua sezione “seo”, e che questa non è stata redatta (ecco perché il primo h1 è vuoto).
Se però gli h1 stampati nel sorgente son due, come ci mostrano le immagini, allora meglio disattivare il seo del tema perché qualcosa non va.. Oppure nel sito già utilizzi un plugin seo, ed ecco perché trovi nel sorgente due h1.
-
1 Agosto 2012 alle 13:44 #96978apache72Partecipante
credo che sia il primo, quello incriminato come avete detto voi:
ma a me sembra, dalla descrizione nelle righe precedenti il tag, che riguardi un articolo, un post, come se fosse all’interno di questa pagina. Ma io articoli nel sito non ne ho!
Sono solo pagine statiche. Cosa può essere? e con firebug o altri programmi non si può agire direttamente sul codice sorgente,su questo script per rimuoverlo?
-
1 Agosto 2012 alle 18:46 #96980TittiModeratore
1) Non devi rimuovere nessuno script, solo un tag <h1></h1>. E poveri noi se con firebug si potesse agire sul codice dal browser! Il sorgente che vedi, come ho accennato all’inizio, è codice generato, lo guardi ma non lo tocchi. Devi aprire i file del tema per vedere/cambiare il codice PHP, HTML, CSS delle tue pagine.
2) Il problema più grosso (a livello SEO) che devi sistemare per primo, è che non hai il title tag, cioè l’elemento più importante della pagina. Sarebbe quello che puoi vedere in alto nel browser in quella specie di linguetta, dove adesso vedi http://psicologa… Nel blog invece ce l’hai, quindi apri il blog o un qualsiasi altro sito per vedere di cosa parlo. In pratica, se il doppio h1 ti può togliere 1 o 2 punti percentuali, la mancanza del title tag te ne toglie almeno 50.
Questo genere di cose le risolvi con un plugin di SEO, come quello di Yoast, configurandolo con attenzione, oppure come dice S. Pietro controlla che il tema non abbia un suo SEO nativo.
3) Per quanto riguarda il doppio h1 ripeto che è difficile dirlo da qua, devi guardare il file relativo alla homepage (nelle altre pagine non dovrebbe esserci questo problema, se sono tutte statiche sono generate da un altro file), è un h1 che hai nell’header, quindi guarda il file header.php. Cerca i due h1, quello che devi togliere è quello attorno a “blog name”, la riga è chiusa in un tag div. Togli solo <h1> all’inizio e quello di chiusura, non togliere la riga.
Non togliere quello che racchiude “permalink to”, altrimenti poi togli l’unico h1 giustamente presente nelle altre pagine; però dipende, se le altre pagine sono tutte statiche, cioè non hanno niente a che fare con header.php, allora puoi togliere quello, perché sarebbe più giusto lasciare quello attorno al titolo del blog. Più di cosଠnon posso dirti, devi vedere tu e fare delle prove.
Fai sempre backup dei file prima di modificarli.
-
1 Agosto 2012 alle 20:58 #96983apache72Partecipante
Grazie Titti sei grande!
per il title ho risolto, confermami please.
Per l’ h1 non so cosa togliere ti posto il codice dell’header.php se mi indichi bene cosa levare, lasciando il risultato finale te ne sarei grato!
<title>Psicologa Salerno Psicoterapeuta Dr.ssa Mirella Mazzaccaro</title>
<meta http-equiv=”Content-Type” content=”<?php bloginfo(‘html_type’); ?>; charset=<?php bloginfo(‘charset’);?>” />
<link rel=”profile” href=”http://gmpg.org/xfn/11″ />
<link rel=”alternate” type=”application/rss+xml” title=”<?php bloginfo(‘name’); ?> RSS Feed” href=”<?php echo (!empty($tpinfo))? $tpinfo : bloginfo(‘rss2_url’); ?>” />
<link rel=”pingback” href=”<?php bloginfo( ‘pingback_url’ ); ?>” />
<link rel=”stylesheet” href=”<?php bloginfo(‘stylesheet_url’); ?>” type=”text/css” media=”all” />
<?php
wp_enqueue_script(‘jquery’);
if(is_singular() && get_option( ‘thread_comments’)){
wp_enqueue_script(‘comment-reply’);
}
wp_head();
?>
</head>
<body <?php body_class();?>>
<div id=”bg_top”><div id=”bg_btm”><div id=”base”><div id=”base_top”><div id=”base_btm”>
<div id=”header”>
<?php
$tmp=(is_home() || is_front_page())? “h1″:”div”;
$tmp2=($tpinfo[$tpinfo.’_blogtitle’]==’true’)? ”:’ class=”indent”‘;
?>
<<?php echo $tmp;?> id=”blog_name”<?php echo $tmp2;?>>” title=”<?php echo esc_attr(get_bloginfo( ‘name’, ‘display’ ) ); ?>” rel=”home”><?php bloginfo(‘name’); ?></<?php echo $tmp;?>>
<div id=”blog_desc”<?php echo $tmp2;?>><?php bloginfo(‘description’);?></div>
” title=”RSS Feed” class=”rss”>
<div id=”menubar”>
<?php wp_nav_menu( array( ‘container’=>’div’,’container_class’ => ‘menu’, ‘theme_location’ => ‘primary’) ); ?>
</div>
<form class=”mainsearch” action=”<?php bloginfo(‘url’); ?>/” method=”get”>
<input class=”keyword” type=”text” value=”” name=”s” id=”s” />
<input class=”submit” value=”” type=”submit”/>
</form>
</div>
<div id=”container”><div id=”container_top”><div id=”container_btm”>
-
2 Agosto 2012 alle 13:49 #96990TittiModeratore
Non si mette codice nei post perché non viene stampato com’è nella realtà , per far vedere del codice nel forum devi copia/incollarlo
su Pastebin e poi mettere qua solo il link.
Per l’home page statica stai usando lo stesso template che usi per le altre pagine statiche?
Se sà¬, dal file header potresti provare a togliere || is_front_page()
Comunque sappi che, avendo messo il title tag, anche con due <h1> il tuo risultato SEO della home page ora è 98% (prima era 48%), e checché ne dica Bing non mi sembra un brutto risultato, equiparandosi quasi a quello delle altre pagine (99%), dove hai 1 tag h1, ma ti manca almeno un tag h2.
-
2 Agosto 2012 alle 17:59 #96993apache72Partecipante
Ok ho risolto! grazie mille.
p.s. da dove si vede il risultato delle percentuali seo e la mancanza del tag h2?
-
2 Agosto 2012 alle 20:01 #96994TittiModeratore
SEO Doctor, addon di Firefox.
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.