Two ways I can think of
1. A two column gallery
2. Two image blocks, both left aligned. If you want the result centered, put the two image blocks inside a group block and center that.
Thread Starter
eitanc
(@eitanc)
Thanks Steve,
Yep, I found the Columns block and used it, so it gives some solution.
The strange thing is that I align the block to center but the text is aligned to the right… any ideas why?
Please provide a link to a page on your site where we can see this. Thanks.
Thread Starter
eitanc
(@eitanc)
Thread Starter
eitanc
(@eitanc)
BTW, I use the plugin of Polylang and this page is set for “Hebrew”
Use this CSS
.wp-block-column .wp-block-image figcaption {
text-align: center;
}
To add or override CSS: use the “Additional CSS” option in the customizer. https://codex.wordpress.org/CSS#Custom_CSS_in_WordPress
Learn to use the Chrome Developer Tools or Firefox Developer Tools to help you see and test changes to your CSS.
Thread Starter
eitanc
(@eitanc)
I added to the image blocks of Liacom and Fiverr but it didn’t help…
Thread Starter
eitanc
(@eitanc)
I edited the page, selected the relevant image block and in its block attributes > advanced > I added your code and then updated the page
Thread Starter
eitanc
(@eitanc)
You can also see it in the page source code
That’s NOT what I said to do… Put in in the Additonal CSS via the customizer.
Thread Starter
eitanc
(@eitanc)
Sorry about this.
Yep, it solved it!
But if I understand correctly – this will affect any image block I have now or have in the future. Will it? and if so – how can I exclude it from specific image blocks?
Only image blocks in columns.
Thread Starter
eitanc
(@eitanc)
OK, so how do apply exceptions to this rule? Shouldn’t the per block CSS overwrite the main customizer CSS?
You could add a class to your blocks, say “center-caption” and use this CSS instead, I think. Blocks without that class would follow the default behavior.
.center-caption figcaption {
text-align: center;
}