- This topic has 10 replies, 5 voices, and was last updated 3 years, 2 months ago by
Leo.
-
AuthorPosts
-
November 14, 2019 at 7:13 pm #1063537
Steven
Hi
Immediately following the last update to WordPress, the styling of the captions on my site broke. I am currently using Generatepress Pro with Elementor Pro, but the problem persists whether I have elemector installed or not. I have tried clearing my cache, disabling all plugins, etc and still no change. I tried installing some other themes (Hello, Astra, Ocean WP) and the caption styling seems fine with those. Any ideas?
(I have disabled my caching plugin)
November 14, 2019 at 9:33 pm #1063589Tom
Lead DeveloperLead DeveloperHi there,
It seems Gutenberg moved their caption CSS into the optional additional stylesheet that isn’t loaded by default.
Give this function a shot:
add_action( 'after_setup_theme', function() { add_theme_support( 'wp-block-styles' ); } );
Let me know ๐
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentNovember 15, 2019 at 12:38 am #1063649Steven
Thanks Tom. That looks much better!
November 15, 2019 at 2:06 am #1063712Shrawan
Hi Tom, where do I insert the code that you have mentioned above? Sorry I’m a bit new to this and would need guidance.
November 15, 2019 at 3:11 am #1063776David
StaffCustomer SupportHi there,
that code is PHP – this article explains:
https://docs.generatepress.com/article/adding-php/
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/November 15, 2019 at 10:49 am #1064298Shrawan
Hello David,
I’m not for installing any new plugins like Simple CSS, so if you can tell me exactly where I need to paste this code in the “Additional CSS” tab of the “Customize” option, I would be glad. I’d request you to give me the exact location where I need to paste the code which Tom has mentioned above –
add_action( ‘after_setup_theme’, function() {
add_theme_support( ‘wp-block-styles’ );
} );November 15, 2019 at 10:54 am #1064302Leo
StaffCustomer SupportThat code is PHP so it cannot be in the Additional CSS field in the customizer.
It would need to be one of these methods:
https://docs.generatepress.com/article/adding-php/Code Snippets plugin is the easiest way and should have minimal impact on your site.
If not then Child theme’s
function.php
is the only other solution.Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/November 15, 2019 at 11:00 am #1064311Shrawan
Hello Leo, can I place that text anywhere in the functions.php file from within the WordPress ‘Theme Editor’ option?
November 15, 2019 at 11:16 am #1064316Leo
StaffCustomer SupportNo. It’s not a good idea to add any code to the theme’s core files.
It will get erased during updates.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/November 16, 2019 at 1:29 am #1064634Shrawan
Thank you, this issue is resolved. In the subject of captions, can you please provide me a simple way to increase the size of the image caption site-wide? I wish to increase the size of all image captions (past and future) by 1 size.
November 16, 2019 at 8:59 am #1064966Leo
StaffCustomer SupportPlease open a new topic for your question as it’s not related to the original post/topic and this is not your topic.
I’m happy to provide the code once you do ๐
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/ -
AuthorPosts
- You must be logged in to reply to this topic.