Archived topic
AJAX Load More Installation: Where to replace the_content()?
5 replies · Started by Eric on July 22, 2020
Hey GPress Team, hope you guys are all staying safe wherever you are...
I just wanted to request for some help, I have purchased a plugin AJAX Load More and I am trying to install it but it's a bit advanced for me. The plugin will load my posts dynamically via AJAX after a visitor clicks the READ MORE button, but to make it work I need to replace the_content() in my GPress child theme. I don't know where to find the_content() to replace I've looked in the Theme Editor for both my Child Theme and main GPress installations but I don't really know where to replace it. Here is the actual plugin installation that I'm trying to complete:
https://connekthq.com/plugins/ajax-load-more/add-ons/next-page/#implementation-2
I hope you guys can point me in the right direction so I don't break my site! Just to clarify, I'm trying to use this shortcode on single posts and not blogroll/index/archive pages.
Thank you for your time and I hope to hear from you soon.
Hi there,
you will need to create a copy of the content-single.php template in your Child Theme.
Here is the template, and i have marked the line where the_content() function is found.
OK great I'll give this a shot... do you have any documentation for creating a copy for my Child Theme? Sorry I just want to make sure I don't screw it up!
I assume you have FTP / File access to your server.
Go to the wp-content/themes/generatepress folder.
And copy the content-single.php and paste it into your child theme folder.
Of if you create an empty file for the content-single.php in your child theme you can copy and paste the template from here:
https://raw.githubusercontent.com/tomusborne/generatepress/master/content-single.php
OK I think I figured it worked... thank you again! Stay safe GPress team :)
Glad to be of help. You too!