- This topic has 21 replies, 3 voices, and was last updated 4 years, 4 months ago by
wo.
-
AuthorPosts
-
November 16, 2021 at 11:17 am #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 🙂 ?
November 16, 2021 at 11:24 am #2006921wo
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 (?!)
November 16, 2021 at 11:46 am #2006935Ying
StaffCustomer SupportHi 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/#archivesIf you need further assistance, can you link us to your site?
November 16, 2021 at 1:01 pm #2007000wo
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?
November 16, 2021 at 1:22 pm #2007007Ying
StaffCustomer SupportCan you link me to the site?
November 16, 2021 at 1:34 pm #2007014wo
Of course:
November 16, 2021 at 1:52 pm #2007022Ying
StaffCustomer SupportSo 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.
November 16, 2021 at 2:12 pm #2007037wo
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:
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.
November 16, 2021 at 2:51 pm #2007067Ying
StaffCustomer SupportYour site has an error:
Failed to load resource: net::ERR_TOO_MANY_REDIRECTSCan you try disable all plugins except GP premium and GenerateBlocks to test?
November 16, 2021 at 3:03 pm #2007078wo
oops, never seen such an error. Anyway, everything is deactivated now. Except GPP and GB.
November 16, 2021 at 3:44 pm #2007102Ying
StaffCustomer SupportAfter you disabled all other plugins, this error is still there, it stops infinite scroll from working:
https://www.screencast.com/t/ojeUmd1VBut 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.
November 16, 2021 at 3:54 pm #2007110wo
Ok, I’ll check that and get back to you again.
November 16, 2021 at 3:56 pm #2007112Ying
StaffCustomer SupportKeep us updated 🙂
November 17, 2021 at 4:13 am #2007563wo
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?
November 17, 2021 at 5:07 am #2007605wo
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?
-
AuthorPosts
- You must be logged in to reply to this topic.