Are you a GenerateCustomer?

Do you have an active GP Premium or GenerateBlocks Pro license key?

Create a GenerateSupport account for GeneratePress and GenerateBlocks support in one dedicated place.

Create an account
Already have a GenerateSupport account? Login

Just browsing?

Feel free to browse the forums. Support for our free versions is provided on WordPress.org (GeneratePress, GenerateBlocks).

Want to become a premium user? Learn more below.

Excessive DOM size

  • Dear Support,

    We applied an H1 tag for RankMath issue “No H1 tag was found on your homepage.”, which solved the RM issue.

    But created Pagespeed issue “Avoid an excessive DOM size 1,171 elements”

    Maybe “hidden H1 tag” is an issue.

    And that our homepage settings are 100 posts on infinite scroll for “Blog pages show at most / Syndication feeds show the most recent” (which gves the whole abundance effect of the full grid I love)

    Stuck in a bind, could do with some help.

    Thank you.

  • Hi there,

    And that our homepage settings are 100 posts on infinite scroll

    This is the issue.
    In Settings > Reading reduce the Blog pages show at most to a reasonable number, eg. 10 or 15.
    This will set the number of posts to load on initial load and for each subsequent page of the homepage/archive. Note, infinite scroll simply loads the next page of posts on scroll.

  • πŸ™ Is there no way I can keep the 100 posts? 15 is hardly a cornucopia at first sight, for our Grid of Plenty πŸ™

  • The Blog pages show at most tells WordPress how many posts to load on initial load and on each page.
    So on initial load it will only load 15 posts, which os way better for your server and the overall load time.
    As the user scrolls down the Infinite scroll option you have active in the blog will load the next 15 ( page ) of posts until there are no more posts to load.

    So if you had 100 posts, the user will see all of them, but just think of them as being lazy loaded in batches.

  • Could it automatically load the next 15 posts, when user scrolls down, without having to click the “+ More” button? That would solve the whole thing very elegantly πŸ™‚

  • In Customizer > Layout > Blog, see here for reference:

    https://docs.generatepress.com/article/blog-content-layout/

    Check the Use Infinite Scroll
    And leave the Use button to load more posts UNChecked.

  • Sorry I missed that, thanks a lot David this is exactly what I hoped for.

    And I read some stories about infinite scroll hurting your ranking, but if Speedtest has no issues seems all is good no (or is that the GeneratePress secret sauce)?

  • SEO issues with Infinites scroll…. some SEO experts raised the concerns that Search engines do not scroll, so how would they load the hidden content?
    Well WP still generates the Pagination for the blog and archives based on that Blog pages show at most value.

    So for example:

    https://yourhomepage.com/page/2/

    This paginated page still exists, so it can still be indexed

  • Three years later I finally got it just so, thanks.

    Coffee time!

  • Welcome to the future πŸ™‚
    Glad to be of help. Enjoy the coffee

  • Haha no I dropped some more in your coffee fund https://generatepress.com/ongoing-development/ for helping me achieve this!

  • Thats really kind of you and much appreciated!

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