Hi, My website link is https://healthynutritionhabits.com/
I want to put Adsense above and below pagination. Screenshot I need it like on this website. http://healthyandpretty.com/30-foods-that-should-never-be-put-in-the-refrigerator/
And also I want to remove/hide pagination {<Back Next>} from the whole HOMEPAGE. Pagination Screenshot
Please give me tutorial how to do this. Thanks
-
This topic was modified 7 years by
TechieBraj.
Hi,
From what I can see you are using the default WordPress blog page, with module 15 to display the posts. Module 15 will show the whole post content.
Some smart list templates can display ads – https://www.screencast.com/t/ulEiXrsix
For example styles 6 and 7 display the ad like this
– https://demo.tagdiv.com/newspaper/whitewater-rafting-day-trip-new-york-east/
– https://demo.tagdiv.com/newspaper/10-landscapes-wont-even-imagined-exist/
But there are no ad spots above and below the smart list pagination. The website you are referring to seems to use a plugin slider
– https://www.screencast.com/t/0F4C0EQV2ki
Maybe that has options to display ads like that.
The pagination you are referring to is the smart list pagination. Module 15 you use for the blog page displays all the post content in the homepage
– https://www.screencast.com/t/de5Ys1Xy
So if there are smart lists in the post, they will appear in the homepage, since the whole post content appears. But I see you removed it with CSS at the moment.
Thanks
Ok, so can you tell me the location where I can manually insert Adsense code to below the pagination(Next, Back) for post template page only?
When I use this code to hide the pagination from home page then it hides the pagination from HOME as well as from post. So tell me how can I hide pagination only from home, not from the post.
a.td-smart-list-button.td-smart-next {
display: none;
}
span.td-smart-list-button.td-smart-back.td-smart-disable {
display: none;
}
To display ads there you would have to edit the smart list template files and insert the ads there by some means
– https://www.screencast.com/t/oexM1f1HM8Wv
But then the ads will appear everywhere the respective smart list style is displayed, so a condition would have to be wrapped around the ad code to make the ads display only in the homepage
– https://codex.wordpress.org/Function_Reference/is_front_page
This would be a somewhat similar topic – https://forum.tagdiv.com/topic/want-to-show-extra-content-starting-from-page-two-of-smart-list/
That CSS code will apply on the whole website as it is now. To make it apply only in the homepage use it like this
.home span.td-smart-list-button.td-smart-back.td-smart-disable,
.home a.td-smart-list-button.td-smart-next {
display: none;
}
Or like this, more simplified
.home .td-smart-list-pagination {
display: none;
}
The website is using smart list 6 in all the post so in smart list template files in which line should, I inject my add code to show the add above and below the (Next, Back pagination) of the post?
This is my adsence code so tell me how will i implement this there?
<script async src=”//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js”></script>
<!-- Healthy Nutrition -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-9460275789861650"
data-ad-slot="5127002749"
data-ad-format="auto"
data-full-width-responsive="true"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
Do it around the pagination code inside the smart list 6 code, wrap both the ads in a condition like this
– https://www.screencast.com/t/VatLbePecMz
I used the custom ad 1 and custom ad 2 spots in the example, code here
– https://pastebin.com/keLvDvyB
Made a quick test, homepage – http://prntscr.com/m0i19m
Post page – http://prntscr.com/m0i1vx
You can experiment with this more to see if it works properly.
Thanks for the guide but when i applied everything then code worked but ADD is showing on homepage instead of post pagination page. Please look at this and give me guide only for post page not for homepage.
Thanks
Then add a negation of the is front page, so it will not appear in the homepage
– https://www.screencast.com/t/9Yr5Mld8LO
So if it’s not the homepage the ads will appear.