Help with Infinite post blocks scrolling in a single post.

Posted in: Newspaper
Post count: 436

Hi Tagdiv,

With the help of a tutorial written here – https://forum.tagdiv.com/topic/implement-infinite-scroll-on-single-posts/ and by using some common sense, I was able to apply infinite post scrolling on a single post.

Here is the step I took for this:

1. I am using TagDiv composer for the pages but to be able to use infinite scrolling on a single post, I have to enable Visual Composer for posts.

2. I wanted block-3 design and my default post type is: Style-1 so, I edited loop-single-1.php, I added the required code

Here is the code that you need to add under loop-single-1.php after <?php echo $td_mod_single->related_posts();?>

<?php $category_detail=get_the_category($td_mod_single->post->ID);//$post->ID

foreach($category_detail as $cd){ $cat_name = $cd->cat_ID; } $exclude_current_post = $td_mod_single->post->ID; echo do_shortcode('[vc_row][vc_column][td_block_3 custom_title="All LATEST STUFF" separator="" post_ids="'. -$exclude_current_post .'" category_id="' . $cat_name . '" limit="6" td_ajax_preloading="preload" ajax_pagination="infinite" ajax_pagination_infinite_stop="3" tdc_css=""][/vc_column][/vc_row]'); ?>

Though it worked properly, but I face two main issues.

1. I am using smart sidebars on each post and usually, it works great. With this infinite scrolling. I noticed that ‘The smart sidebar’ keep scrolling even above the full width infinite scrolling post blocks, and hence it overlaps.
( Here is the snapshot of overlapping – http://i.imgur.com/WCZfHcN.jpg )
How to make smart scroll stops once infinite scrolling starts? I noticed that this site ( http://www.storypick.com/short-film-affair/ ) is successfully able to use infinite scrolling and smart sidebar both. Please help me with this.

Overall, I want to to have a function like this: http://darnkid.com/illustrations-show-the-unique-bond-between-dads-and-daughters/ ( created by tagdiv user Darnkid )

2. Is there any way to have this feature without enabling visual composer for posts? Can we use TagDiv composer for this?

3. While trying for many solutions, I looked at a thread which suggested to el_class=”td-ss-row” for this. I tried using it in the above code. Well, though it stopped the overlapping of sidebar with infinite post blocks, it also disables the smart sticky property of Sidebar. What am I missing here?

Kindly help me with this.

Thank you.

Post count: 22421

Hello,

Well since the smart sidebar was never designed to work with infinite loading there is missing functionality that needs to be implemented in the sidebar function in order for it to stop at the end of the post and then the other one grabbed for the next post. But since this was never part of the theme but a customization you made, you will have to create the implementation for the sidebar as well if you want to have smart sidebars on infinite posts.
Sorry but this is not tested and there is no official solution I can provide for infinite loading. Sorry. The process is more complex than that though. what if you use different post styles? what if you use a smart list? there are a lot of things to consider when creating such customization. That is why we have not been able to figure it out properly as there are many things to consider and the implementation has to be done proper, not just make it work in specific isolated cases. That is why this feature is not yet part of the theme as if the solution were that simple, it would already have been implemented.
Sorry but we cannot provide any assistance into this until our development team decide it is a feature that will be implemented into our theme.

Thanks.

Post count: 436

Hi, Bogdan, thanks for your reply and the concern about the various other cases that can come afterward.

But as you said, there are a lot of things to consider to make these fully compatible. I currently am not looking for the full solution.
I only want to make it work for the single template that I use by default for most of my posts ( no smart lists, isolated templates etc. )

You have written above that:

…. and then the other one grabbed for the next post.

In case you are confusing this infinite scrolling with Auto load next post thing, the both things are totally different. We have discussed separately about auto load next post thing here- https://forum.tagdiv.com/topic/need-little-help-with-most-demanded-auto-load-next-post-thing/ but this is a sperate case.

And I noticed that you guys have already helped a lot to make us be able to use the infinite scroll here- https://forum.tagdiv.com/topic/implement-infinite-scroll-on-single-posts/

Everything is working already. You just need to help us stop ‘smart sidebar’ once the ‘Visual composer’ based tag for ‘infinite loading’ starts.

One look at the code of http://darnkid.com/illustrations-show-the-unique-bond-between-dads-and-daughters/ or http://www.storypick.com/success-is-the-best-revenge/ ( both using infinite scrolling with TagDiv Newspaper theme along with proper use of smart sidebar) may solve this issue.

If you don’t want to help, I will surely hire someone to do so, but since you guys have already done a lot about this ( https://forum.tagdiv.com/topic/implement-infinite-scroll-on-single-posts/ ), I don’t see much point to hire someone else for just one simple ( or may be not?) part of it.

So, please reconsider this post.

PS: Has Probably Andrei L. left the TagDiv team? He has worked a lot on this under this thread -https://forum.tagdiv.com/topic/implement-infinite-scroll-on-single-posts/ .

Thank you.

Post count: 22421

Hello,

Unfortunatly as you mentione yourself:

just one simple ( or may be not?) part of it.

We tried to help people implement this and we soon abandoned the idea because of the implications that arose and the complexity of the implementation. That is the reason we do not want to tackle it again via the support until our dev. team decide to implement it officially. There were no simple solutions found. Sorry for the inconvenience but infinite loading is beyond what the support team can offer you at the moment.

Thanks

Post count: 436

I totally understand your comment on this and I will look forward having an inbuilt feature for this in our themes.

Everyone wants to get extra traffic to their site and for any news/magazine site whose main source of revenue is based on RPM, it’s very much needed.

TagDiv is the best and the most popular news/magazine theme still available in the market but with this sudden surge in ‘mobile first’ users and with the inception of new features like ‘infinite scrolling’ etc., I believe your dev team must need to review their priorities.

Love for Tagdiv.

Regards,
Nitesh

Viewing 5 posts - 1 through 5 (of 5 total)
The forum ‘Newspaper’ is closed to new topics and replies.