Docs    Facebook    Troubleshooting

The Load More button isn’t working

Load More needs the plugin JavaScript, which will not load if your theme footer is missing the wp_footer function.

Would you like to fix a Facebook feed where the Load More button keeps showing a loading animation, or where the likes and comments never load?

Both parts of the feed depend on the same two things. The plugin’s JavaScript file has to run on your page. Your site also has to answer the requests that file sends.

When you click Load More, the file shows a loading animation on the button and asks your site for more posts. It removes the animation when your site sends the posts back.

For likes and comments, the file asks your site for the details of each post after the page loads.

If the file doesn’t run, neither part works. If a request gets blocked, the Load More animation keeps going and those details don’t load.

Before you get started, make sure you can open the page that shows your feed and view its page source in your browser. To find the cause, check the three things below in order.

Here is what we will cover.

The Plugin’s JavaScript File Isn’t Loading

To get started, we’ll check whether your page loads the plugin’s JavaScript file.

Facebook Feed adds its JavaScript file to the footer of your page. If your theme doesn’t print the footer scripts, none of your plugins can load the JavaScript files they add to the footer. To check, view the page source of a page that shows your feed.

  1. Open the page that shows your feed in your browser.
  2. Right-click anywhere on the page and choose View Page Source.
  3. Search the source for cff-scripts. The plugin adds the file near the bottom of your page, with a script tag like the example below.

Here is an example of the script tag in the paid version. In the free version, the folder name is custom-facebook-feed.

<script src="https://example.com/wp-content/plugins/custom-facebook-feed-pro/assets/js/cff-scripts.min.js?ver=VERSION"></script>

If the file isn’t there, it’s most likely that your theme doesn’t call the WordPress wp_footer() function in its footer.php file. Plugins use this function to add their JavaScript files to your page. To add it, open your theme’s footer.php file and add the following line immediately before the closing </body> tag.

<?php wp_footer(); ?>

If the file is there, move on to the next section.

A JavaScript Error Is Stopping the Plugin’s JavaScript

If the file is on your page but the feed still doesn’t work, another script on your site may be failing. This can stop the plugin’s JavaScript from running. Your browser lists these errors in its developer tools.

  1. Open the page that shows your feed in your browser.
  2. Open your browser’s Developer Tools.
  3. Select the Console tab.
  4. Reload the page and look for errors shown in red.

Each error includes the file it came from. If that file belongs to your theme or to another plugin, start your troubleshooting there. The plugin’s JavaScript needs jQuery to run. If you see an error about jQuery, include it when you contact our support team.

If you don’t see any errors, move on to the last section.

A Security Plugin Is Blocking the Requests

The Load More button and the likes and comments send their requests to the admin-ajax.php file on your site. If you have a security plugin installed, there’s a small chance that it blocks these requests and answers with a 403 Forbidden error. The cause can be rules the security plugin applies to certain directories or files on your site.

To check, look for the error in your browser.

  1. Open the page that shows your feed in your browser.
  2. Open your browser’s Developer Tools and select the Network tab.
  3. Click the Load More button in your feed. If the likes and comments are the problem, reload the page instead.
  4. Look for a request to admin-ajax.php with a 403 status.

You can also temporarily deactivate your security plugin to see whether it’s the cause.

If you use Wordfence, we have a guide with the steps to fix it. See Wordfence Security Is Blocking Requests.

For other security plugins, check the plugin’s settings and allow requests to admin-ajax.php. If you’re not sure how to do this, please contact your web admin or web host for assistance.

That’s it! You can now check that the plugin’s JavaScript file loads, look for JavaScript errors, and find out whether a security plugin is blocking the requests your feed needs. If your feed still doesn’t show new posts, see our guide on a Facebook feed that appears to have stopped updating.

Frequently Asked Questions

Below, we’ve answered some common questions about the Load More button and the likes and comments in your feed.

Why do I keep seeing a loading animation after I click Load More?

The plugin shows the animation when you click the button and removes it when your site sends the new posts back. If your site doesn’t send the posts back, the animation keeps going. One example is a security plugin that blocks the request with a 403 error. To check, follow the steps in A Security Plugin Is Blocking the Requests.

Why do I need two clicks on Load More, or why does it add the same posts twice?

This can happen when the plugin’s JavaScript file loads twice on the same page. To check, search the page source for cff-scripts, as described in The Plugin’s JavaScript File Isn’t Loading. If the file appears twice, go to Facebook Feed » Settings and open the Advanced tab. When the AJAX theme loading fix setting is on, the feed adds its own copy of the file. The plugin already loads one copy. The setting is meant for themes that load pages with Ajax. If your theme doesn’t, turn the setting off and click Save Changes.

I fixed the cause, but the feed still doesn’t work. What should I do?

To fix this, clear the cache of any caching plugin on your site and any cache your web host adds. Then reload the page. Page caches can keep serving an older copy of your page that doesn’t include the fix. See How to Clear Your Cache in WordPress for a step-by-step guide.

support

Couldn’t find your answer in the docs?

Contact Support