- This topic has 14 replies, 2 voices, and was last updated 6 years, 9 months ago by .
Ads & Infinite scroll
You must be logged in to reply to this topic.
Is there a way to ad an adspot on the homepage after 10-15 posts or so? I’d like to use this if I can get the homepage to have infinite scroll. I’d also like infinite scroll to count as a pageview after every 10-15 posts or so. Is this possible?
Hi Alan,
Yes you can use a plugin to insert ads on the home page.
For example https://wordpress.org/plugins/ad-inserter/
You ca set the number of posts it shows on each load by editing the jetpack.php file located in /inc/ folder of your theme.
Replace the contents in the jetpack.php with the following code
function novapress_jetpack_setup() {
add_theme_support( 'infinite-scroll', array(
'container' => 'main',
'footer' => 'page',
'type' => 'scroll',
'posts_per_page' => '12',
'footer_widgets' => false,
) );
}
add_action( 'after_setup_theme', 'novapress_jetpack_setup' );
Change the posts_per_page value to what you want.
We will be releasing an update for Novapress Pro soon which will allow you to set this number in the Customizer.
Ok, thanks. I can’t seem to get infinite scroll to work on my homepage though. My homepage doesn’t even have “Next Stories” at the bottom that allows me to toggle to older stories. This is my website: http://newsaloo.com/
I’ve tried adding a plugin for infinite scroll and that didn’t work. I also enabled infinite scroll in Jetpack and that didn’t work either.
Make sure you have updated Novapress to the latest version.
See here https://www.themely.com/novapress-pro-v1-0-6-released/
Current version is now at 1.0.8
That will fix the infinite scroll issue.
I updated it but there is still no infinite scroll. Do I need to enable something?
You need to create more posts on the site. It will load 12 posts every time a user scrolls down.
So if you only have 12 right now, it won’t show any additional.
Hi @alan8228
Ok good. I thought I only saw 12 posts.
Try disabling and deleting the Jetpack plugin, and re-install it.
If that does not work, give me admin access so I can go in and trouble-shoot the issue.
Ok that would be great. I disabled Jetpack and deleted it. At the bottom of my homepage I saw a page 1, 2, etc. Which had disappeared before. But when I downloaded and reenabled Jet Pack again and tried the infinite scroll both disappeared again. What email should I use to give you admin access?
Hi @alan8228
We found the issue.
There was a file missing from the theme in our latest update.
Please go ahead and update your theme again, the issue will be fixed.
We apologize for the trouble.
I updated the theme but infinite scroll still isn’t working. I made you an admin.
You must be logged in to reply to this topic.