I am using customized version of _s theme where I have Product CPT. In the following files, I need to use Infinite scroll (provided by Jetpack) - archive-products.php taxonomy-[tax-name].php home.php archive.php Now, the problem is most of these templates use custom loop (using WP_Query which ends with pagination after while()). I have used following code in functions.php after activating jetpack and Photon module - function vg_infinite_scroll_init() { add_theme_support( 'infinite-scroll', array( 'container' => 'page-content', 'footer' => 'page', 'type' => 'click', 'render' …
I have set up a custom WP_Query loop for a page template. I am implementing an infinite scroll method via ajax, and the call is successful, but for some reason I cannot get the query to like the paged arg in the loop. It just won't pull anything. Here is the code for my ajax action: // AJAX Infinite Scroll function txcap_ajax_scroll() { $args = isset( $_POST['query'] ) ? array_map( 'esc_attr', $_POST['query'] ) : array(); $args['post_type'] = isset( $args['post_type'] ) …
on my index.php I display all my posts with infinite scroll. Before the WP loop I added a $counter, which counts up with every post. But if the infinite scroll loads new posts, the counter will be reset. Example for counter: 0 1 2 3 4 5 6 7 (load new posts) 0 1 2 3 4 . . . What can I do that the counter counts up after loading new post (...,6,7,8,9,10,...)? Thanks for help! <div class="grid" id="container"> …
I am trying to get Jetpkack's infinite scroll to work with the WooCommerce product archive template. I have added the following code to my theme, after installing Jetpack, and I do see the sticky footer that shows when infinite scroll is enabled, and I see it loading default seven products instead of normal output, which leads me to assume the infinite scroll function is firing: function mytheme_infinite_scroll_init() { add_theme_support( 'infinite-scroll', array( 'container' => 'content', 'render' => 'mytheme_infinite_scroll_render', 'footer' => 'wrapper', …
I have a page with all my blog posts in it and I have it set to show all my posts on one page. (See screenshot) Now am I looking for away to only show 10 posts at a time and on scroll show more. I see there are plugins like this https://en-ca.wordpress.org/plugins/ajax-load-more/ but this needs a pagination, I do not want a pagination because of SEO reasons. (new SEO errors come up when a new page for the pagination …
How to create infinite scroll in wordpress for blog and custom post type. I have tried jetpack infinite scroll but its not working on custom wordpress page template for custom post type. I looked at this tutorial but it seems old http://code.tutsplus.com/tutorials/how-to-create-infinite-scroll-pagination--wp-24873 And also looked this one https://github.com/infinite-scroll/infinite-scroll but this project is no longer maintained. Please tell me or recommend some new tutorials that are compatible with Wordpress 4.5 for create infinte scroll. Thanks
I need help with getting infinite scrolling working on my custom template here's what the plugin is asking. Navigation selector: The selector that contains the product navigation Next selector: The selector of the link that redirects to the next page Item selector: The selector of the single product on the shop page Content selector: The selector of the general box in the product list of the shop What I tried is too many to count but ill list most of …
I'm using GeneratePress (GP) theme. They have default infinity scrolling feature. I am using this infinity scrolling instead of pagination. But problem is when I go to homepage or category page and type /page/2/ (for example /page/2, it can be page 100) with domain name like domain.com/page/2/ or domain.com/category/bike/page/2/ still showing the result. But I want to remove these page I mean when anybody type this /page/2/ they will see page not found notice. How can I do that??
Background information can be skipped. I wanted to use the infinite scrolling option on my Wordpress theme, but I am not well trained in Javascript so I tried this solution: https://wptheming.com/2012/03/infinite-scroll-to-wordpress-theme/ function custom_infinite_scroll_js() { //Code as given in the link above } add_action( 'wp_footer', 'custom_infinite_scroll_js', 100 ); I wasted my couple of days at the above-mentioned article and later realized that everything is outdated and even the JS by metafizzy has been updated. Challenges faced were: img: The path to …
I have a plugin that helps me to make lazy loading on posts of a custom post type. The idea is to add an action to the template_redirect/init and get data from the global $wp_query to make jquery understand how much loading there needs to be done. The plugin php file looks like this: function pbd_alp_init() { global $wp_query; // Add code to index pages. if( !is_singular() ) { // can i select a specific post type here? wp_enqueue_script( 'pbd-alp-load-posts', …
I'm looking to set up pagination on my single.php file so I can have my infinite scroll function correctly. I know that pagination can be put on a single post but I somehow need to make the single.php page be able to have an appended variable on the URL. What I mean is if I have this URL: http://www.example.com/post_URL/ I would need it to function like this: http://www.example.com/post_URL/page/2/ It needs to function like that because I have the infinite scroll …
I'm using Infinite Scroll and the following great code from here to generate Next Taxonomy Term Link in a term loop. I want to ajax append Next Woocommerce Product Category when you reach the end of the current category. Everything works fine except it only loads 1 term and then it says "No more Items to show". Even the browser url changes depending on which term you are scroll positioned. Any idea if this is possible this way? Next / …
I was wondering if it's possible to make only the Wordpress homepage (with the latest posts) have infinite scroll and keep the pagination on desktop view. I have viewed some other questions regarding this here but some of them are using plugins and some just want infinite loop on both desktop and mobile.
I am on WordPress 5.3.2 running Twenty Fourteen Child theme. socalda.org For some reason if you look at the site on the phone you cannot scroll down anymore. It scrolls down on the computer but not on the phone.
I am using Infinite Scroll on a site that is using a custom styled MediaPlayer Element (using Wordpress' built-in MediaElements.JS). The style initially loads fine, but once Infinite Scroll loads content from the next page everything breaks. Instead of being loaded in their special MediaPlayerElements structure, they are loaded in plain html5 audio tags making them look completely different. From what I've researched, it seems that this is do to MediaPlayerElement not being reloaded after Infinite Scroll gets the next …
I've created an infinite scroll without using any plugin to achieve the objective. The problem is that the bootstrap masonry cards grid are loading all the posts cards at the first scroll or will load the grid in a wrong way until a scroll event occurs. I'm using the viewport checker jquery plugin that will work nice when the page where I've implemented this is loaded,it will add a fade in animation from the animate.css library, but on the appended …
When I scroll the page in chrome it show the intervention error. I tried adding various script like window.addEventListener("mousedown,wheel", handleMouseDown, { passive: false}); but unable to fix that. Please see screenshot attached.
I'm trying to remove the infinite-wrap class jetpack adds to posts with infinite scroll turned on because I want to add infinitely loaded posts to a gridded layout. I found the article here that says to add the theme support stuff to the functions.php :https://trickspanda.com/customize-jetpack-infinite-scroll/ I ended up adding add_theme_support( 'infinite-scroll', array( 'wrapper' => false, ) ); The weird thing is this has no effect. I have jetpack installed as a plugin and turned on infinite scroll the the settings …
I have a infinite scroll working on my wordpress site. It works perfectly well on category pages, e.g. example.com/example however it doesnt work when I try to use it on a search page, e.g. example.com/example//?search=true&gender=female I know I need to pass more parameters to the AJAX call, I'm just not sure how. The shortcode is like so.. do_shortcode('[talent taxonomy="'.$_GET['params']['taxonomy'].'" term="'.$_GET['params']['term'].'" page="'.$_GET['params']['page'].'" per_page="'.$_GET['params']['per_page'].'"]'); And the AJAX: var ajax_data = { page:1, taxonomy:"'.$a['taxonomy'].'", term:"'.$a['term'].'", per_page:"'.$a['per_page'].'", max_pages: '.$my_query->max_num_pages.' };
I'm using the Underscores theme which comes with the following (very) handy code in inc/jetpack.php add_theme_support( 'infinite-scroll', array( 'container' => 'main', 'render' => 'infinite_scroll_render', 'footer' => 'page', 'wrapper' => false ) ); function infinite_scroll_render() { while ( have_posts() ) { the_post(); if ( is_search() ) : get_template_part( 'template-parts/content', 'search' ); else : get_template_part( 'template-parts/content-', get_post_type() ); endif; } } I can't figure out the best way to edit either of these functions to ignore a particular post type. I can …