Thread Starter
Adam
(@panhead)
Yes, infinite scroll is enabled. Version 2.0b2.110822 using WP 3.3.1. Thanks! 🙂
Thread Starter
Adam
(@panhead)
Got the new update to Infinite Scroll (2.0b2.120111). Doesn’t seem to have fixed the CPT issue. 🙁
Doesn’t seem to work anymore on my “posts” page anymore either.
http://adambaney.adambaney.com/posts/
Thread Starter
Adam
(@panhead)
No longer works with my “posts” page or my “blog” (custom post type) page.
Posts page:
http://adambaney.adambaney.com/posts/
Blog (CPT) page:
http://adambaney.adambaney.com/blog/
Using Infinite Scroll Version 2.0b2.120226. Any ideas?
Hi Adam,
I can’t remember if we tried this but I (fairly) recently put a filter to force infinite-scroll to load on certain pages (its aimed at custom blog pages etc).
So in your themes functions.php add something like:
function my_load_infinite_scroll( $load_infinite_scroll ) {
if( is_page('news') )
return true;
return $load_infinite_scroll;
}
add_filter('infinite_scroll_load_override', 'my_load_infinite_scroll');
Obviously you could just edit that function to return true always or add some something that sets a variable in your custom page (which you can then check in the function) or use one of the WordPress functions to. I recognise its not ideal but I haven’t really got any time to dig into the code at the moment.
Thread Starter
Adam
(@panhead)
Thanks so much! This worked!
Now that I’ve finally gotten over this hurdle, how would I make it work with other CPTs?
For example, I have my “Work” on my home page. I initially created the page with the title of “Work” and a slug of “work”. In the WP Settings, I set the Home page to be the “Work” page.
In the Settings for Infinite Scroller, I added the proper CSS selectors in conjunction with the CSS selectors for my Blog. These are separated with a comma, e.g. “#content #blogEntries_wrapper .blogEntry, #content #work_wrapper .workEntry”.
In the functions file, maybe this is where I have it wrong? I added the “Home” page to the code (I’ve also tried “home”):
function my_load_infinite_scroll( $load_infinite_scroll ) {
if( is_page('blog', "Home") )
return true;
return $load_infinite_scroll;
}
add_filter('infinite_scroll_load_override', 'my_load_infinite_scroll');
Please refresh my site, or clear the browser cache, if there are some display issues.
Thanks a bunch for your help!
I had the same problem of having it working on the blog list but not in a page displaying only one category of posts (not the /category/category-name, one that I created with a <?php query_posts( ‘cat=4’ ); ?> query). But this latest function fixed the problem:
function my_load_infinite_scroll( $load_infinite_scroll ) {
if( is_page('my-page-name') )
return true;
return $load_infinite_scroll;
}
add_filter('infinite_scroll_load_override', 'my_load_infinite_scroll');
Hello!
I have the same problem!
I don’t know if I use the correct selectors…
Please take a look at http://www.youandsaturation.com. I have the last version of “Infinite Scroll”.
Can you help me configuring that plugin correctly?
Thanks in advance!
Regards,
Bruno Moura