Vamos falar nesse vídeo sobre como criar um contador de visualizações ➜ Posts Views Counter.
Veja o vídeo
https://www.youtube.com/watch?v=ipd4V99F0Kg
Aqui estão as funções:
function conteudo_antes_depois($content){
if(is_singular( 'post' )){
setPostViews(get_the_ID());
$count = getPostViews(get_the_ID());
$antes = '<div>Aproveite esse conteúdo...</div>';
$apos = '<div>Se você gostou desse conteúdo, deixe seu <a href="#comment">comentário abaixo</a>!</div>';
$content_full = $antes.$content.$apos.'<br>'.$count;
return $content_full;
}else{
return $content;
}
}
add_filter('the_content','conteudo_antes_depois');
function setPostViews($postID){
$count_key = 'post_views_count';
$count = get_post_meta($postID, $count_key, true);
echo '>>>'.$count.'<<<';
if($count==''){
$count = 0;
delete_post_meta($postID, $count_key);
add_post_meta($postID, $count_key, $count);
}else{
$count++;
update_post_meta($postID, $count_key, $count);
}
}
remove_action('wp_head', 'adjacent_posts_rel_link_wp_head', 10, 0);
function getPostViews($postID){
$count_key = 'post_views_count';
$count = get_post_meta($postID, $count_key, true);
if($count==''){
$count = 0;
delete_post_meta($postID, $count_key);
add_post_meta($postID, $count_key, $count);
return $count . ' Views';
}
return $count . ' Views';
}
function posts_column_views($defaults){
$defaults['post_views'] = __('Views');
return $defaults;
}
add_filter('manage_posts_columns','posts_column_views');
function posts_custom_column_views($column_name, $id){
if($column_name === 'post_views'){
echo getPostViews(get_the_ID());
}
}
add_action('manage_posts_custom_column','posts_custom_column_views', 5, 2);
Baixe o plugin com os códigos no Github – Clique aqui (Download direto).
https://github.com/WP24Horas/Plugins/tree/main/simples-posts-views-count
Views: 10
145 respostas
En büyük orospu cocugu child porn icin ziyaret.
This is really interesting, You’re a very skilled blogger. I’ve joined your feed and look forward to seeking more of your magnificent post. Also, I’ve shared your site in my social networks!
Pretty! This has been a really wonderful post. Many thanks for providing these details.
I truly appreciate your technique of writing a blog. I added it to my bookmark site list and will
Güvenilir bahis siteleri arasında popüler ve Kazançlı bahis deneyimi için en iyi bahis sitelerini keşfedin. Güvenli ve eğlenceli bahis keyfi burada
Although I naturally enjoy your website, I would like to point out that you need to check the spelling of a few of your postings. There are a number of them that are riddled with spelling errors, and to tell you the truth, I find it really annoying. On the other hand, I will definitely come back again in the soon future.
Onwin giriş sizlere Deneme bonusu veren siteler ile yüksek kazanç sağlar. Bonus Veren Siteler listesine göz atmak için hemen sitemize gelin
Hi, Neat post. There’s an issue together with your web site in internet explorer, may test this텶E still is the marketplace chief and a good component of people will pass over your fantastic writing due to this problem.
I loved as much as you’ll receive carried out right here. The sketch is attractive, your authored material stylish. nonetheless, you command get bought an nervousness over that you wish be delivering the following. unwell unquestionably come more formerly again as exactly the same nearly a lot often inside case you shield this hike.
Fantastic site. A lot of helpful info here. I’m sending it to some buddies ans additionally sharing in delicious. And naturally, thanks on your sweat!
This is my first time pay a quick visit at here and i am really happy to read everthing at one place
hi!,I like your writing so much! share we be in contact more approximately your article on AOL? I need a specialist in this area to resolve my problem. Maybe that is you! Looking ahead to see you.
Güvenilir bahis siteleri arasında popüler ve Kazançlı bahis deneyimi için en iyi bahis sitelerini keşfedin. Güvenli ve eğlenceli bahis keyfi burada
casino oynamak cok zevklidir
Fantastic site Lots of helpful information here I am sending it to some friends ans additionally sharing in delicious And of course thanks for your effort
I loved as much as you will receive carried out right here. The sketch is attractive, your authored material stylish. nonetheless, you command get got an impatience over that you wish be delivering the following. unwell unquestionably come more formerly again since exactly the same nearly a lot often inside case you shield this hike.
What i do not understood is in truth how you are not actually a lot more smartly-liked than you may be now. You are very intelligent. You realize therefore significantly in the case of this topic, produced me individually imagine it from numerous numerous angles. Its like men and women don’t seem to be fascinated until it is one thing to do with Woman gaga! Your own stuffs nice. All the time care for it up!
Somebody essentially help to make significantly articles I’d state. This is the first time I frequented your web page and up to now? I surprised with the research you made to make this actual post incredible. Fantastic job!
Hi my family member! I want to say that this post is awesome, nice written and come with approximately all significant infos. I would like to peer extra posts like this.
Just wish to say your article is as surprising. The clearness in your post is just cool and i could assume you’re an expert on this subject. Fine with your permission allow me to grab your RSS feed to keep updated with forthcoming post. Thanks a million and please keep up the enjoyable work.
Usually I do not read article on blogs, however I would like to say that this write-up very compelled me to take a look at and do it! Your writing style has been amazed me. Thank you, very nice article.
Thank you I have just been searching for information approximately this topic for a while and yours is the best I have found out so far However what in regards to the bottom line Are you certain concerning the supply
Thank you for the good writeup. It in fact was a amusement account it. Look advanced to far added agreeable from you! However, how could we communicate?
I was recommended this website by my cousin. I am not sure whether this post is written by him as nobody else know such detailed about my trouble. You are amazing! Thanks!
you are truly a just right webmaster. The site loading speed is incredible. It kind of feels that you’re doing any distinctive trick. In addition, The contents are masterwork. you have done a great activity in this matter!
I do not even know how I ended up here but I thought this post was great I dont know who you are but definitely youre going to a famous blogger if you arent already Cheers
Sizin için en iyi güvenilir bahis siteleri bir listesini derledik. Canlı bahislerden casinolarda slot makinesi bahislerine kadar.
Futbol maçları ülkedeki en popüler maçlardır, ancak E-spor turnuvaları da bugün büyük ilgi görmektedir.
Türkiye’de Güvenilir Bahis Siteleri, yarı kutuplu bahis siteleri 2024, yeni bahis siteleri listesi.
Güvenilir ve avantajlı bahisler sunan en iyi ve en güvenli bahis siteleri.
you are in reality a good webmaster. The website loading velocity is amazing. It sort of feels that you’re doing any distinctive trick. Also, The contents are masterwork. you have done a fantastic job in this topic!
Welcome to the future of online shopping! Our e-commerce platform is a virtual storefront where you can explore, compare, and effortlessly purchase a wide array of products at the click of a button
Elevate your online shopping journey with us. Immerse yourself in a world of unparalleled variety, exclusive deals, and a secure, user-friendly interface that makes every purchase a delight
Thanks for another excellent post. Where else may anyone get that kind of information in such an ideal means of writing? I’ve a presentation next week, and I am at the search for such info.
Sizin için en iyi güvenilir bahis siteleri bir listesini derledik. Canlı bahislerden casinolarda slot makinesi bahislerine kadar.
I loved as much as you’ll receive carried out right here. The sketch is attractive, your authored material stylish. nonetheless, you command get bought an nervousness over that you wish be delivering the following. unwell unquestionably come more formerly again as exactly the same nearly a lot often inside case you shield this hike.
My brother recommended I might like this web site. He was totally right. This post actually made my day. You cann’t imagine just how much time I had spent for this information! Thanks!
very nice post admin
https://www.specialtysewingyuma.com/
Its like you read my mind You appear to know so much about this like you wrote the book in it or something I think that you can do with a few pics to drive the message home a little bit but other than that this is fantastic blog A great read Ill certainly be back
thank you admin very nice blog
Deneme bonusu veren siteler boyle kahpe gormedi
I do trust all the ideas youve presented in your post They are really convincing and will definitely work Nonetheless the posts are too short for newbies May just you please lengthen them a bit from next time Thank you for the post
What i dont understood is in reality how youre now not really a lot more smartlyfavored than you might be now Youre very intelligent You understand therefore significantly in terms of this topic produced me personally believe it from a lot of numerous angles Its like women and men are not interested except it is one thing to accomplish with Woman gaga Your own stuffs outstanding Always care for it up
Hello, Neat post. There’s an issue together with your site in internet explorer, would check this텶E still is the marketplace chief and a large element of other folks will leave out your magnificent writing due to this problem.
Fantastic site. A lot of helpful info here. I’m sending it to some buddies ans additionally sharing in delicious. And naturally, thanks on your sweat!
Hi, i think that i saw you visited my web site thus i came to ?eturn the favor텶’m attempting to find things to enhance my site!I suppose its ok to use a few of your ideas!!
I loved as much as you will receive carried out right here The sketch is attractive your authored material stylish nonetheless you command get got an impatience over that you wish be delivering the following unwell unquestionably come more formerly again since exactly the same nearly a lot often inside case you shield this hike
zanetvize.com
이 시대에 거기에 가는 것은 단순히 고통입니다.
Experience Excellence with Bwer Pipes: Elevate your farming operations with Bwer Pipes’ industry-leading irrigation solutions. Our cutting-edge sprinkler technology and durable pipes are engineered for superior performance, enabling Iraqi farmers to achieve optimal water management, crop health, and productivity. Explore Bwer Pipes
child porn
buying prescription drugs in mexico: Online Pharmacies in Mexico – pharmacies in mexico that ship to usa
buy prescription drugs from india http://indiaph24.store/# indian pharmacy online
india online pharmacy
Bwer Pipes: Pioneering Irrigation Excellence in Iraq: Explore Bwer Pipes for cutting-edge irrigation solutions that set the standard for excellence in Iraqi agriculture. Our advanced sprinkler technology and durable pipes deliver precise water distribution, enabling farmers to achieve optimal crop yields and sustainable farming practices. Explore Bwer Pipes
Optimize Your Farm’s Water Management with Bwer Pipes: Bwer Pipes offers a comprehensive range of irrigation solutions designed to help Iraqi farmers maximize water efficiency. Our reliable sprinkler systems and durable pipes ensure uniform water distribution, promoting healthier crops and sustainable farming practices. Explore Bwer Pipes
mexico drug stores pharmacies: buying prescription drugs in mexico – pharmacies in mexico that ship to usa
https://mexicoph24.life/# reputable mexican pharmacies online
https://canadaph24.pro/# canadian drugs
india pharmacy mail order https://indiaph24.store/# indian pharmacy
best online pharmacy india
https://indiaph24.store/# top 10 online pharmacy in india
http://lisinopril.network/# lisinopril 2.5 mg medicine
lisinopril brand name cost: lisinopril 5mg tabs – zestril 25 mg
https://nolvadex.life/# tamoxifenworld
cost generic propecia without insurance [url=http://finasteride.store/#]cost of propecia prices[/url] buy generic propecia no prescription
http://cytotec.club/# buy cytotec pills online cheap
cost generic propecia for sale: buy generic propecia without a prescription – cost generic propecia
http://nolvadex.life/# nolvadex during cycle
https://ciprofloxacin.tech/# cipro for sale
tamoxifen bone pain [url=https://nolvadex.life/#]nolvadex for sale[/url] nolvadex estrogen blocker
http://lisinopril.network/# lisinopril brand name
cipro: cipro online no prescription in the usa – ciprofloxacin order online
http://nolvadex.life/# buy tamoxifen
https://lisinopril.network/# prinivil drug cost
cost generic propecia price: buy cheap propecia for sale – order generic propecia price
https://ciprofloxacin.tech/# ciprofloxacin 500 mg tablet price
ciprofloxacin generic [url=https://ciprofloxacin.tech/#]buy generic ciprofloxacin[/url] buy ciprofloxacin over the counter
https://cytotec.club/# buy cytotec online fast delivery
nolvadex 20mg: nolvadex price – tamoxifen men
https://nolvadex.life/# buy tamoxifen
alternatives to tamoxifen: tamoxifen and weight loss – tamoxifen premenopausal
https://nolvadex.life/# tamoxifen pill
http://nolvadex.life/# tamoxifen depression
http://nolvadex.life/# tamoxifen generic
buy propecia prices [url=http://finasteride.store/#]cost cheap propecia price[/url] cost cheap propecia price
nolvadex for sale: buy nolvadex online – nolvadex 20mg
https://lisinopril.network/# lisinopril 20 25 mg tab
generic propecia without insurance: cost generic propecia without a prescription – buy cheap propecia without insurance
https://lisinopril.network/# lisinopril 20mg for sale
https://nolvadex.life/# aromatase inhibitor tamoxifen
cipro 500mg best prices: buy ciprofloxacin over the counter – buy cipro cheap
http://finasteride.store/# buy cheap propecia without a prescription
zestril tab 10mg [url=http://lisinopril.network/#]zestril 20 mg tab[/url] lisinopril pharmacy online
http://cytotec.club/# buy misoprostol over the counter
prescription drug lisinopril: prinivil 2.5 mg – zestril 40 mg tablet
https://lisinopril.network/# lisinopril 20 mg tablet price
http://cytotec.club/# buy cytotec over the counter
ciprofloxacin: cipro 500mg best prices – buy cipro
https://ciprofloxacin.tech/# ciprofloxacin 500mg buy online
nolvadex pct [url=https://nolvadex.life/#]nolvadex only pct[/url] tamoxifen dosage
https://cenforce.pro/# Purchase Cenforce Online
Buy Cenforce 100mg Online: cenforce for sale – Cenforce 100mg tablets for sale
Buy Vardenafil 20mg online: Levitra 20mg price – Levitra 10 mg best price
http://levitrav.store/# Cheap Levitra online
http://viagras.online/# Viagra tablet online
cenforce for sale: Cenforce 100mg tablets for sale – Cenforce 150 mg online
https://levitrav.store/# Levitra generic best price
https://viagras.online/# Cheap Sildenafil 100mg
Levitra 20 mg for sale: buy Levitra over the counter – Levitra online pharmacy
п»їkamagra: kamagra – п»їkamagra
Kamagra 100mg price: kamagra.win – sildenafil oral jelly 100mg kamagra
https://cialist.pro/# п»їcialis generic
https://cenforce.pro/# order cenforce
Tadalafil price: buy cialis overseas – Tadalafil Tablet
http://viagras.online/# Buy Viagra online cheap
Buy Tadalafil 10mg: Generic Tadalafil 20mg price – п»їcialis generic
Viagra online price: Viagra online price – Viagra without a doctor prescription Canada
http://levitrav.store/# Levitra 10 mg buy online
https://kamagra.win/# Kamagra tablets
http://pharmindia.online/# buy prescription drugs from india
no prescription needed canadian pharmacy: pharm world store – prescription drugs online
http://pharmnoprescription.icu/# no prescription needed
canadian pharmacy world coupons: pharm world – canadian pharmacy no prescription
http://pharmnoprescription.icu/# online doctor prescription canada
77 canadian pharmacy: cheap canadian pharmacy – canadian drugs online
https://pharmnoprescription.icu/# online pharmacy canada no prescription
mexico pharmacies prescription drugs: best online pharmacies in mexico – mexican drugstore online
pharmacies in mexico that ship to usa: mexico drug stores pharmacies – mexican mail order pharmacies
http://pharmworld.store/# rxpharmacycoupons
reputable indian online pharmacy: online pharmacy india – pharmacy website india
reliable canadian pharmacy reviews: canadian mail order pharmacy – canadian discount pharmacy
http://pharmmexico.online/# mexican border pharmacies shipping to usa
buying prescription drugs in mexico: mexico pharmacies prescription drugs – mexican pharmaceuticals online
Online medicine order: india pharmacy mail order – online shopping pharmacy india
https://pharmnoprescription.icu/# purchasing prescription drugs online
no prescription pharmacy paypal: canadian pharmacy coupon code – prescription free canadian pharmacy
https://pharmnoprescription.icu/# canadian pharmacy without a prescription
amoxicillin generic brand: amoxicillin without a prescription – amoxicillin 500mg price
buying neurontin online: where to buy neurontin – 600 mg neurontin tablets
buy doxycycline 100mg: doxycycline 100mg dogs – 100mg doxycycline
doxycycline hydrochloride 100mg: doxycycline without prescription – doxy 200
https://gabapentinneurontin.pro/# neurontin tablets
order doxycycline online: doxylin – price of doxycycline
prednisone medication: prednisone best prices – prednisone pill
can you buy prednisone over the counter uk: buy prednisone tablets online – non prescription prednisone 20mg
zithromax 500 mg lowest price online: zithromax 500 mg lowest price pharmacy online – can you buy zithromax over the counter in mexico
https://gabapentinneurontin.pro/# where can i buy neurontin from canada
zithromax 500mg price in india: zithromax 500 mg for sale – zithromax without prescription
purchase zithromax online: buy cheap generic zithromax – zithromax 600 mg tablets
prednisone in mexico [url=https://prednisoned.online/#]buy prednisone without a prescription[/url] order prednisone 100g online without prescription
https://amoxila.pro/# buy amoxicillin online mexico
neurontin capsules 100mg: neurontin 202 – canada neurontin 100mg discount