Infinite Scrolling in Posts

Hello there,

I recently followed a tutorial (Jetpack infinite scroll & X Theme) to implement scrolling. Its work great on archive pages, but how can I do the same for our individual blog posts?

Like this: https://www.searchenginejournal.com/international-seo-guide-ecommerce-optimizing-online-store/377948/

Can you please guide me here?

Thanks!

Here is the function I used.

// Add theme support for Jetpack infinite scroll
// =======================
add_action( ‘after_setup_theme’, ‘jetpack_infinite_scroll_init’ );
function jetpack_infinite_scroll_init() {
add_theme_support( ‘infinite-scroll’, array(
‘container’ => ‘content’,
‘render’ => ‘jetpack_infinite_scroll_render’,
‘posts_per_page’ => get_option( ‘posts_per_page’ ),
‘footer’ => false,
‘footer_widgets’ => false,
‘footer_callback’ => ‘no_jetpack_footer’,
) );
}
// Render the posts
function jetpack_infinite_scroll_render() {
$is_filterable_index = is_home() && x_get_option( ‘x_ethos_filterable_index_enable’ ) == ‘1’;
if ( $is_filterable_index ) :
x_get_view( ‘ethos’, ‘_index’ );
else :
x_get_view( ‘global’, ‘_index’ );
endif;
}
// (remove Jetpack’s annoying popup footer)
function no_jetpack_footer() { ?>

<?php } // =======================

Hi Saswata,

Thanks for reaching out.

Regretfully, customizing custom code is outside the scope of our theme support. You may seek 3rd party developer or you can avail our One Support to help you with the customization.

Here’s a list of our theme actions and filters that might able to help you.
https://theme.co/docs/actions-filters-and-hooks#x-and-pro-specific-actions-and-filters

Hope that helps.

Thank you.

Hi Cramaton,

Thanks for the reference, but can’t find the single post option. Can you please guide me exactly what I need to change, like “is_filterable_index” this? and secondly can you please tell me the single post filter? “x_get_view( ‘ethos’, ‘_index’ );”. If I understand something then, ‘_index’ index pages right?

umm, sorry if I override my limit. Can you please little bit guide me here.

For One Support, will look into this in future.

Thanks,

Hey Saswata,

Regretfully, we cannot provide support for third party plugins or scripts as our support policy in the sidebar states due to the fact that there is simply no way to account for all of the potential variables at play when using another developer’s plugin or script. Because of this, any questions you have regarding setup, integration, or troubleshooting any piece of functionality that is not native to X will need to be directed to the original developer.

Thank you for your understanding.

Hi, I understand, can you please add this in the feature list, as I saw there are bunch of posts on this topic, so it will be great if X or Pro, already have the setup, or a documentation.

Thanks.

Hey Saswata,

Your feedback has been noted. This has been added to the feature request list so that it can be taken into consideration for future development. All of these items are discussed with our team internally and prioritized based on the amount of interest a particular feature might receive.

Thanks!

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.