Site logo

[Support request] Block Content Template, Location = Homepage

Home Forums Support [Support request] Block Content Template, Location = Homepage

Home Forums Support Block Content Template, Location = Homepage

Viewing 15 posts - 1 through 15 (of 22 total)
  • Author
    Posts
  • #2006913
    wo

    Hello again,

    I created a block content template consisting of a container including several headlines, an ACF, a shortcode, and finally: a “read more” button.

    Everything fantastic. As long as the location is _not_ homepage.

    Location = Blog: superb.

    Location = Search results: superb.

    Location = Blog & Search results: superb, as well.

    Location = Homepage: No post list anymore, at all. Just a single fragment of the template.

    If I tell WP, show latest posts on homepage: the content template works as expected, showing my exceptionally designed post archive.

    Else, telling WP, show this (empty) page as homepage: nothing works. No matter, if my content template specifies location = home, or not.

    What’s wrong (with me 🙂 ?

    #2006921
    wo

    AND where am I supposed to specify, how many posts?

    Even if my template works, there seems to be a limit of 10 posts or so. Of course, I would like to set the limit by myself. Even better: with infinite scroll.

    If infinite scroll is impossible, there should be at least some kind of pagination (?!)

    #2006935
    Ying
    Staff
    Customer Support

    Hi there,

    Is your home page a static page? If so, the content template won’t work, the template you built will only work for archive pages.

    Even if my template works, there seems to be a limit of 10 posts or so.

    WP has the option at settings > reading > Blog pages show at most.

    If infinite scroll is impossible, there should be at least some kind of pagination (?!)

    GP has the infinite scroll option, and pagination is the default setting on an archive page if infinite scroll is not activated.
    https://docs.generatepress.com/article/blog-content-layout/#archives

    If you need further assistance, can you link us to your site?

    #2007000
    wo

    Hi Ying,

    thanks. I know this WP option, Settings > Reading, default 10 blog posts, excerpts or full.

    I didn’t expect this limit applies to block content templates, as well.

    And I didn’t expect, that such templates don’t work on static pages. Even if I have the option, location: homepage.

    Is there any hope for a future update?

    My template creates a post archive list without both, pagination or infinite scroll. Infinite Scroll is a GPP feature, activated. I suppose, GB doesn’t know it 🙂

    What about an additional Element Type “Archive Navigation”, below the archive list?

    #2007007
    Ying
    Staff
    Customer Support

    Can you link me to the site?

    #2007014
    wo
    #2007022
    Ying
    Staff
    Customer Support

    So now the home page is blog page, the content template works on home page.

    The infinite scroll option is activated, so there will be no pagination.

    When the page loads, the number of posts that you set at settings > reading will show, as you scroll down, the rest of posts will show.

    So how many posts did you set at settings > reading?

    And how many posts in total do you have on your website?

    Let me know 🙂

    For your earlier questions:

    And I didn’t expect, that such templates don’t work on static pages

    If you have posts archives on a static page, it’s usually added by a plugin or other blocks that the theme doesn’t have control of, so the template won’t work.

    We are working on our own post loop block currently which will allow the content template be used on static pages as well.

    #2007037
    wo

    The content template does on the homepage, since WP Settings > Read = Latest Posts.

    And due to this setting, the WP limit applies. But, without pagination. And, without infinite scroll.

    For demo, I set the limit to 3 latest posts. This is the result:

    https://generateclicks.de

    And of course, there are _tons_ of more posts there, at least 6 or 7 🙂

    How could I check and activate pagination or infinite scroll?

    Anyway, good news, that you are already working on “real” block templates for static pages. Can’t wait, to be honest.

    #2007067
    Ying
    Staff
    Customer Support

    Your site has an error: Failed to load resource: net::ERR_TOO_MANY_REDIRECTS

    Can you try disable all plugins except GP premium and GenerateBlocks to test?

    #2007078
    wo

    oops, never seen such an error. Anyway, everything is deactivated now. Except GPP and GB.

    #2007102
    Ying
    Staff
    Customer Support

    After you disabled all other plugins, this error is still there, it stops infinite scroll from working:
    https://www.screencast.com/t/ojeUmd1V

    But GP doesn’t do any kind of redirecting.

    So can you contact your hosting provider – tell them the error and ask them to look at why it is happening.

    #2007110
    wo

    Ok, I’ll check that and get back to you again.

    #2007112
    Ying
    Staff
    Customer Support

    Keep us updated 🙂

    #2007563
    wo

    Ok, here’s the update 🙂

    My homepage seems to work now.

    The block content template included. And, indeed, the post archive there is infinitely scrolling.

    Could you please verify again?

    #2007605
    wo

    Ok, here’s another update 🙂

    Unfortunately, Infinite Scroll is still not working completely. When scrolling down, you should see this entirely gray video preview image.

    The first Youtube preview is shown as expected.

    The second, appearing after scroll, is grayed. Ironically, this is a GP video 🙂

    I can easily “repair” this by switching Customize > Layout > Blog > “infinite scrolling” OFF.

    Now 2 pages appear, paginated. Each of it has a Youtube preview. And both are displayed as they should.

    These previews are generated by the plugin WP Youtube Lyte.

    The block content template includes a Shortcode for a PHP Snippet, which gets the video id from an ACF and calls the plugin to do its thing.

    Any hint?

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