Jump to content

Archived

This topic is now archived and is closed to further replies.

bfrye26

how to use the Infinite Scroll Module in JetPack on DMS

Recommended Posts

bfrye26

Hello,

 

I have been trying to set this up and working for the past week. The Infinite Scroll Module in JetPack. It seems to be easy to set up but I am unsure what settings I need to add to ensure it works.

 

If anyone has any ideas that would be amazing!

 

Look forward to hearing peoples concepts

Share this post


Link to post
Share on other sites
Rob

I searched the forums and found that people had difficulty with this Jetpack plugin with previous versions, like Framework and PlatformPro.  I tried to find a solution among the forum replies, but with little luck.

 

You may well be one of the only people using that! I'm not sure whether to congratulate you or sympathize!

 

This might help  http://forum.pagelines.com/topic/19783-installing-infinite-scroll-in-platform-pro-choosing-css-selectors/?hl=infinite

 

Or this http://forum.pagelines.com/topic/17516-pagelines-and-infinite-scroll/?hl=infinite

 

I hope either of these links provide you with answers.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
beardedavenger

Brendan!!! Hope we got you all figured out:

http://betterdms.com/2013/09/10/infinite-loading-posts-in-pagelines-dms/

 

Put up just for you!


Something big is coming for DMS + photographers.

http://fotostheme.com

 

Nick Haskins & CO - New home for all of my PageLines Store products! 

http://nickhaskins.co

 

Better DMS - News, Tutorials, and Tips

http://betterdms.com

 

Share this post


Link to post
Share on other sites
bfrye26

beardedavenger Thanks for this! already implemented it on the site! working for the most part! I posted a comment on the betterDMS post. Seems I have run into a custom post type snag. I am sure I am just missing something. Thanks for all the help!

Share this post


Link to post
Share on other sites
bfrye26

Okay, it seems from what beardedavenger says, because I use custom posts my 

pre_get_posts

is only activating on first load. I have this in my functions.php file and it works to load the key elements on load but can not work for the infinite scrolling with this plugin.

add_filter( ‘pre_get_posts’, ‘my_get_posts’ );
function my_get_posts( $query ) {
if ( is_home() && $query->is_main_query())
$query->set( ‘post_type’, array( ‘post’,'gamereview’,'moviereview’,'comicreviews’,'hardwarereviews’,'artricles’,'podcast’,'video’ ) );
return $query;
} 

Does anyone know what should be added to ensure the infinite scroll can use the aspects of the pre_get? or maybe alter the code so it knows to call the custom post types?

Share this post


Link to post
Share on other sites
bfrye26

Okay after looking into it I found this to help. Only issue is I am unsure how to impliment the sugestion. What I tried did not work.

 

Maybe someone has an idea: 

 

The following will point you in the right direction: add your custom post-type to $wp_query; by adding the following:

$args = array(
'post_type' => 'post-type'
}

And: $query = new WP_Query($args); above $max = $wp_query->max_num_pages;

From there on you can pretty much customize it the way you like .. even integrate your theme options if you have them! (I renamed $wp_query to $query by the way, not sure if that is really necessary). Play around with it a little and you'll be able to do all sorts of cool stuff!

Share this post


Link to post
Share on other sites
greenfly

Hello Brendan 

 

I will look into this for you. 


The answer to many issues can be found by searching in the forum before posting as someone else  may very well have had the same problem before you have.  Also, reading the documentation can help you gain a good understanding of how everything works. 

 

Please do not send me private messages. Occam's razor - The principle states "Keep things simple!"

Share this post


Link to post
Share on other sites
bfrye26

Martin Davies thanks for this! It is the last thing I am really missing on the site!

Share this post


Link to post
Share on other sites

×