Site logo

[Resolved] Error in button “load more”

Home Forums Support [Resolved] Error in button “load more”

Home Forums Support Error in button “load more”

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #1535088
    Jesus

    Good afternoon, when I am on the main page and I click on the “load more” button, it does not load more articles, but it redirects me to the main page at the top.

    #1535205
    Leo
    Staff
    Customer Support

    Hi there,

    Any chance you can disable all plugins except GP Premium to eliminate conflicts from other plugins first?

    Let me know 🙂

    #1535233
    Jesus

    I have disabled all plugins and the problem has been fixed. So the problem is a plugin that doesn’t let the button do its job?

    #1535246
    Leo
    Staff
    Customer Support

    Likely some error from one of your plugins.

    You can re-activate them one by one to determine the issue.

    #1539530
    Jesus

    I have deactivated all of them one by one, and there is none that makes that error happen, it disappears for a moment, but after time it happens again.

    #1539536
    Leo
    Staff
    Customer Support

    Can you disable all (not one by one) plugins except GP Premium as once for us to take a look?

    #1557094
    Baz

    Hi Leo, I was searching for this very issue.

    I’m testing GP Premium on a local host setup with no other plugins. As pointed out by Jesus, I have selected ‘infinite scroll’ & ‘use button to load more posts’ in the Blog module.

    When I click on ‘+ More Button’, More posts are loaded, but I’m taken back to the top of the page.

    If I uncheck ‘Smooth scrolling’ in Customizer > General, it works as it should.

    I would like to keep smooth scrolling for anchor links, but don’t want to be sent back to the top when using infinite scroll.

    Must be some conflict between the two options.

    Thanks.

    #1558626
    David
    Staff
    Customer Support

    Hi there,

    have you added any snippets to change the behaviour of the smooth scroll ? for example this which applies smooth scroll to every link:

    https://docs.generatepress.com/article/generate_smooth_scroll_elements/

    Let me know.

    #1558852
    Baz

    Hi David,

    Yes I did add that snippet to enable smooth scroll to anchor text links.

    Thanks

    #1559348
    Leo
    Staff
    Customer Support
    #1559412
    Baz

    Using the modified smooth scroll anchor link code solved the problem.

    add_filter( 'generate_smooth_scroll_elements', function( $elements ) {
      $elements[] = '.entry-content a[href*="#"]';
      
      return $elements;
    } ); 

    Infinite Scroll, plus Smooth Scroll activated, now work as they should.

    Thanks Leo, and David.

    #1559476
    Leo
    Staff
    Customer Support

    No problem 🙂

Viewing 12 posts - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.