Home › Forum › Problemi Vari con WP › Visualizzazione numero visite, senza plugin
-
AutorePost
-
-
2 Gennaio 2014 alle 23:39 #26259vittorioc93Partecipante
Ciao a tutti
Vorrei sapere come inserire il numero delle visualizzazioni sotto ogni articolo, senza utilizzare plugins.
Il mio blog è questo (http://noodloves.it) e l’area dove inserire le visualizzazioni è sotto ogni articolo, subito dopo le categorie ed i tags.
Utilizzo un tema child, Midori, appartenente a Thematic.
Ho trovato una guida (http://www.hardware-programmi.com/inserire-il-contatore-delle-visite-nei-singoli-post-con-o-senza-plugin-wordpress/) che spiega come fare ciò che cerco e va tutto bene fino al terzo punto, dove non so bene dove inserire il codice: <?php echo getPostViews(get_the_ID()); ?>
Potreste aiutarmi, per favore? Per me sarebbe davvero importante, sto impazzendo da giorni…
P.S. Credo di dover inserire il codice qui, da qualche parte… ma non so dove:
// New PostFooter
function replacement_postfooter($postfooter) {
global $id, $post;
if ($post->post_type == ‘page’ && current_user_can(‘edit_posts’)) { /* For logged-in “page” search results */
$postfooter = ‘<div class=”entry-utility”>’ . thematic_postfooter_posteditlink();
$postfooter .= “</div><!– .entry-utility –>n”;
} elseif ($post->post_type == ‘page’) { /* For logged-out “page” search results */
$postfooter = ”;
} else {
if (is_single()) {
$postfooter = ‘<div class=”entry-utility”>’ . thematic_postfooter_postcategory() . thematic_postfooter_posttags(); DA INSERIRE QUI ???
} else {
$postfooter = ‘<div class=”entry-utility”>’ . thematic_postfooter_postcomments() . thematic_postfooter_postcategory() . thematic_postfooter_posttags(); DA INSERIRE QUI ???
}
$postfooter .= “</div><!– .entry-utility –>n”;
$postfooter .= ‘<div class=”divider”> </div>’;
return $postfooter;
}
}
add_filter(‘thematic_postfooter’,’replacement_postfooter’);
-
3 Gennaio 2014 alle 17:46 #108661vittorioc93Partecipante
Potete anche chiudere…
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.