posts by stats le maqephe nkoa – Wordpress

Ho bontša phihlello kakaretso posts by le maqephe? Re tla fetoloa kapa plugin “poso-talimang lintho” e le hore e boetse e sebetsa jwalo e accesses stats (Hits).

bothata

The “poso-talimang lintho” Ke plugin hore e tlaleha kamoo ka makhetlo a mangata poso hao / leqepheng 'nile a etela, le Analysis qaqileng. Empa ha e le hantle, se ile sa Post ho bolela hore, hore na ke hobane'ng, E na plugins ba 'maloa mofutakwalo hore le etse se tšoanang.

Seo ke batlang ne e le ho bontša palo yohle ya accesses ho Blog kaha ke ile ka qala ho bala, empa ke ile ka fumana tšobotsi ena ka “poso-talimang lintho”.

E fellang kateng le, ho sebelisa plugin ena ka nako e itseng 'me se a ntse a e-na le setsi sa lieu ya data, o ne a sa le joalo sebelisa plugin e mong hobane feela ba ne ba e lokele. ntan'o, Ke ekeletsoa plugin mokhoa o bonolo empa ho hlaphoheloa kae ka kakaretso phihlello.

tharollo

(1) Kenya kapa plugin “poso-talimang lintho” le kenya tshebetsong tshwariso ya e. Ho kopitsa, etela websaeteng Plugins Wordpress.

(2) ka mor'a intalao, bula faele ea “WP-dikahare / plugins / poso-talimang lintho / poso-views.php” le kena e 'ngoe ea mesebetsi e latelang:

– Bontšana feela phihlello ho tloaelehile hore motho diteng tsa poso / page mme ntlhokomolohang phihlello entsoeng ka liroboto (mekgwa batla)

1
2
3
4
5
mosebetsi get_total_post_views() {
  oa lefatše lohle $wpdb;
  $talimang lintho =  intval($wpdb->get_var($wpdb->lokisetsa("select sum(`post_views_total`) HO TLOHA `wp_post_views_realtime` moo` view_type` = 'tloaelehileng' le `output_type` = 'dikahare'", APP_POST_TYPE)));
  khutlele number_format($talimang lintho,0,',','.');
}

– Bonahatsang phihlello ho tloaelehile ho ngola diteng tsa yone / page mme boetse finyelloang ke liroboto (mekgwa batla)

1
2
3
4
5
mosebetsi get_total_post_views() {
  oa lefatše lohle $wpdb;
  $talimang lintho =  intval($wpdb->get_var($wpdb->lokisetsa("select sum(`post_views_total`) HO TLOHA `wp_post_views_realtime` moo (`View_type` = 'tloaelehileng' kapa` view_type` = "roboto ') 'me `output_type` =' dikahare '", APP_POST_TYPE)));
  khutlele number_format($talimang lintho,0,',','.');
}

(3) Hona joale feela etsa bitsetse setšeng leqepheng u batla ho nka, tse kang faele ea “footer.php” thempleite ea hao:

1
  Kakaretso ea palo ea Hits: <?php molumo get_total_post_views() ?>

(4) sa bofelo, haeba u batla ho bontša phihlello ya palo yohle ya mong le e mong ka ho toba Post, beha khoutu ena ka la hao single.php ea sehlooho sa hao (WP-dikahare / ditlhogo /):

1
2
3
haeba(function_exists('Get_post_views')) { 
    molumo 'Total Access: ' . get_post_total_views();
}

hore, Joale e leng plugin “poso-talimang lintho” E tla sebetsa jwalo ka e accesses stats (Hits) ho Posts le maqephe nkoa.

Sheba botlaaseng ba ena blog ya ho bona kamoo e ne!

Kakaretso ea palo ea Hits: 9141

4 ulasan pelanggan “posts by stats le maqephe nkoa – Wordpress

Leave a Reply

aterese ya hao ya imeile ke ke ho phatlalatswa. masimo a hlokahala a tšoailoe ka *