Load More button never worked


#1

Have spent days on this already, “Load More” button never worked. Inspecting with the developer tool that I see the load more button is linked to:

href="http://www.xxxxxx.com/wall-posts/media/pg/2

Uploading…


#2

I’m also facing some strange issues with some ajax fucntions and cookies on a WordPress site installed with ee create example.com --wpfc. Please give the community a few more details about your website, such as placing its url in case it is live so the rtCommunity folks might be able to help you better.


#3

Thanks

http://www.aee-community.com/explore/

here is the website that I am working on.


#4

:sweat:


#5

Got some time to inspect your website. I’m not a developer, but I feel a bit comfortable with some programming languages. So it seems the “Load More” button is making a request to a page which has no media files to display.

Right bellow is the html code of the Load More button, as you see it links to http://www.aee-community.com/wall-posts/media/pg/2 which is unable to deliver the content. See issues here.

<a id="rtMedia-galary-next" style="display:block;" href="http://www.aee-community.com/wall-posts/media/pg/2">Load More</a>

I’ve noticed you’re using rtMedia plugin, perhaps it might be a settings issue. Be sure to check the plugin’s settings regarding the “number of pages” it loads and if you have enough uploaded media so that the plugin can handle those.

Maybe you’re using an outdated version of the plugin, so reaching out their support might guide you in the right direction.

I didn’t noticed any crucial js error on your page while inspecting it. Anyway, considering how the rtMedia plugin deals with media files, you’d better reach their support for clarifications.

Also your website loads a satisfactory amount of .js files from wordpress/buddypress plugins, thus it also might there be something silently causing the issue. You could try disabling one plugin each time in order to see if you’re able to detect a conflict.

I’ll keep watching you topic, perhaps I can help. Good luck!


#6

HI Mon, Thank you for spending time on it. I tried to bring back the previous version and it worked when I switched to the default theme. I know the problem must be from the template I use for this website but I don’t have time to abandon it and start everything on other themes.

I have made a lot of modifications on my child theme which includes integration of justified gallery and other custom jQuery scripts. I am wondering if there are any other ways ?

This is the shortcode that I use: [rtmedia_gallery global=“true” media_type=“photo” context=“profile” post_type=“page”]

I tried to control the loading behavior by using jQuery, so the page loads more images based on the height of the windows (infinite scroll). However, what happens is that the shortcode itself will automatically pull out everything on the page and the only way to control this is by setting the number per page attribute.


#7

Hey @heswebs. As you mentioned, you’re already making changes to your theme’s child template and files. So if you feel you confident coding in /html/css/php/js, then you could create a new page template and write a custom WP_Query to fetch only the media you want from rtMedia plugin. Creating a custom WP_Query gives you full control of the query parameters, thus making it easier to make both things work together.

An alternative options is the Ajax Load More - Infinite Scroll plugin that allows you to deal with the creation of a custom WP_Query without the need of messing up with the theme’s files.

The plugin helps you build your queries through the selection of a few options, such as custom post types, categories, number of posts/items to fetch etc. The free version allows you to create just one template, so it means you’re able to build just 1 WP_Query a time. After setting up the plugin you would have a shortcode/ php snippet available that you can place on your page and then it’d load your content through Ajax with the Infinity Scroll behavior.

I’ve used the plugin once, it is very responsive and easy to set up. About the compatibility with other plugins, you’d need to give it a try and see how it works on your WordPress environment.

Good luck.


#8