Archived topic
Align the buttons
31 replies · Started by Christiano on September 28, 2022
The PHP Snippet is currently not activated. Can you activate it first, and we'll check again afterwards?
Yes, I left it not activated because the PHP doesn't work...
Now it is activated, you could check.
THANKS! 🤗
Hi there,
just to be clear:
1. you do NOT want to show the manual Excerpt
2. Instead you want to show the first 250 words of the post content
Is that correct ?
Well, yes, I would like to show a certain amount of words to have all the "READ MORE" buttons aligned.
If you want to align the buttons, then add this CSS to your site:
.wp-block-post-template.is-flex-container li {
display: flex;
flex-direction: column;
}
.wp-block-post-template.is-flex-container li :last-child {
margin-top: auto;
}
Hi David, thanks for you help.
What can I do? When I pasted your code the plug-in give me that error...
Don't Panic
The code snippet you are trying to save produced a fatal error on line 1:
syntax error, unexpected '.', expecting end of file
The previous version of the snippet is unchanged, and the rest of this site should be functioning normally as before.
Please use the back button in your browser to return to the previous page and try to fix the code error. If you prefer, you can close this page and discard the changes you just made. No changes will be made to this site.
Hi Christiano,
The code David provided is CSS code, it seems you've added to a PHP code plugin.
Try adding this code to customizer > addtional css.
Oh... 🤭
Now it works like charm indeed... ☺️
Thanks again for your irreplaceable help! 🙏🏼
Counterorder! 😬
I added a little bit of space between the lines and all the alignment is gone... 😞
Hi Christiano,
For reference, can you re-share the link to the site in question?
Hi Fernando, sure!
I see. Can you remove the Spacer Block first, and then let us know where exactly you want spacing? We might need a different approach.
Sure.
I simply would like to have more space between the lines of posts...
THANKS IN ADVANCE! 🙏🏼
You can try adding this in Appearance > Customize > Additional CSS:
.gb-container-eaa30a35 .wp-block-query ul.wp-block-post-template {
row-gap: 50px;
}
Alternatively, you can use a GB Query Loop Block instead: https://docs.generateblocks.com/article/query-loop-overview/
There's an option to add spacing in the GB Query loop Block with no code needed.
Hi Fernando, can I merge your code with David's one?
Like that:
.wp-block-post-template.is-flex-container li {
display: flex;
flex-direction: column;
}
.wp-block-post-template.is-flex-container li :last-child {
margin-top: auto;
}
.gb-container-eaa30a35 .wp-block-query ul.wp-block-post-template {
row-gap: 50px;
}