- This topic has 9 replies, 3 voices, and was last updated 3 years, 10 months ago by
Fernando.
-
AuthorPosts
-
July 18, 2022 at 4:26 am #2285979
Erika
Hi there,
some further Query Loop block questions:
1) is it possible to remove the bottom space of the grid (vertical space of the grid is already set to zero)?
2) is it possible to get nine posts randomly? Currently I get the last 9 and can sort by date. How could I get a certain number randomly?
3) how can I post the whole text, not only excerpt with all the paragraphs? Now I have set the excerpt to 200 to display the whole text, but I have no breaks in it.Thanks,
Erika
July 18, 2022 at 6:50 am #2286108David
StaffCustomer SupportHi there,
1. select the Container block in the Query Loop, and set the Margin Bottom to
0( note the field will be empty )2. Order by: Random is a GB Pro 1.3 option:
https://generateblocks.com/generateblocks-pro-1-3-0/
3. Its not currently a feature, if its something you require i can look to see if can provide some code for that. Let me know.
July 18, 2022 at 7:40 am #2286160Erika
Hi David,
1) I have the structure: containter > query loop block > grid > post content container
container and post content container margin-bottom are set to 0 already. Some other setting prevents to get margin-bottom:0px;
Can you see which one?2) I will test it on another site where we have GB Pro. Good to know.
3) Well, on the first post I tried now the method adding the whole post content in html to the post excerpt box and that works. However, that is quite a lot of work to do that everytime for all posts paragraph by paragraph. If you can come up with a code that keeps the formatting of the original post (basically a code that redoes the deleting of the formatting in the WP core :D), I´d appreciate that.
Another way would be to display the whole post content instead of only the post excerpt… whatever is the easier way…
Thank you, Erika
July 18, 2022 at 7:52 am #2286341David
StaffCustomer Support1. hmmm – something else we need to consider.
Try setting Grid Gap to an actual0value.if not:
Try adding this CSS:
.gb-grid-column.post { margin-bottom: 0; }3. So just to be clear, you would like to simply preserve the HTML in any size of excerpt ?
July 18, 2022 at 8:26 am #2286381Erika
1. The Grid Gap was already set to 0 🙂 but the css works now. Actually I thought that the 40px came from the Customizer somewhere, but couldn´t find it and it doesn´t matter now. Solved.
3. Yes, now that the other issue is solved, basically I have only text in these blog post and I´d like that they are displayed exactly like they are in the blog post, with nice html <p> breaks. Just like the first example on the page where I added the html to the excerpt box.
July 19, 2022 at 3:51 am #2287134David
StaffCustomer Support3. Try adding a Post Content block ( its a core block ) instead of the Excerpt.
July 20, 2022 at 12:20 am #2288098Erika
Hi David,
yes, that would be the solution and that´s what I wanted to do. However, in the dynamic data list there is no Post Content in the Query Loop block. In the WP Loop Query yes, it is there. Not in GB´s list – not even in the Pro Version.
See pictures.
Erika
July 20, 2022 at 12:36 am #2288112Fernando Customer Support
Hi Erika,
I can see it in your screenshot: Beitragsinhalt.
Can you try adding that?
Example of WP Post Content within the GB Query Loop: https://share.getcloudapp.com/jkuX86vG
Kindly let us know how it goes.
July 20, 2022 at 12:41 am #2288115Erika
Hi Fernando,
yes, that was it!
Thanks for the patience.
Erika
July 20, 2022 at 12:42 am #2288119Fernando Customer Support
You’re welcome Erika! Glad that worked!
-
AuthorPosts
- You must be logged in to reply to this topic.