This topic contains 1 reply, has 2 voices, and was last updated by  Hans (Support Admin) 2 days, 14 hours ago.

Ads & Infinite scroll

  • 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

    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.

You must be logged in to reply to this topic.