- This topic has 13 replies, 5 voices, and was last updated 1 year ago by
Elvin.
-
AuthorPosts
-
December 22, 2020 at 8:24 am #1590885
David Pérez
Hello,
It should be nice that some things from frontend should go to the Gutenberg Editor. Like generate_settings – container_width, typography…How could I do it? or Are you planning to put it in nexts versions?
Web: https://en.davidperezgar.com/ | Work: https://close.marketing/
December 22, 2020 at 8:27 am #1590887David
StaffCustomer SupportHi there,
GP already does that by default, check that you have Use Theme Styles enabled, you will find this in the editor 3 dot menu ( top right ) > Preferences > Appearance.
If that is enabled and you are still not seeing the styles then another function or plugin is disabling that.
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/December 23, 2020 at 3:16 am #1591770David Pérez
Yes, ok I do and is activated.
But my container in editor still in 1470, but my container in customizer is 1000px.
Web: https://en.davidperezgar.com/ | Work: https://close.marketing/
December 23, 2020 at 11:22 am #1592414Tom
Lead DeveloperLead DeveloperHi there,
It’s hard to tell without seeing it, but it could be another plugin altering the width of the content.
Can you link us to the front-end of the page in question?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentDecember 23, 2020 at 9:45 pm #1592772David Pérez
It happens in all websites. I share with you one.
Web: https://en.davidperezgar.com/ | Work: https://close.marketing/
December 24, 2020 at 11:02 am #1593496Tom
Lead DeveloperLead DeveloperIs there a specific page I should be looking at?
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentDecember 28, 2020 at 11:44 pm #1597746David Pérez
Any page. It does not contain the CSS of the theme and the settings of the customizer.
How could add Additional CSS to Gutenberg Editor?
Web: https://en.davidperezgar.com/ | Work: https://close.marketing/
December 29, 2020 at 11:56 am #1598631Tom
Lead DeveloperLead DeveloperYou can add the Additional CSS to the editor like this:
add_action( 'enqueue_block_editor_assets', function() { wp_add_inline_style( 'generate-block-editor-styles', wp_get_custom_css_post()->post_content ); } );
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentDecember 30, 2020 at 3:21 am #1599215David Pérez
Perfect! thanks!
Web: https://en.davidperezgar.com/ | Work: https://close.marketing/
December 30, 2020 at 10:25 am #1599903Tom
Lead DeveloperLead DeveloperYou’re welcome 🙂
Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/
Ongoing Development: https://generatepress.com/ongoing-developmentJune 24, 2021 at 4:35 am #1833256David Pérez
Hello Thomas, I get an error with that shortcode:
Warning: Attempt to read property “post_content” on nullWeb: https://en.davidperezgar.com/ | Work: https://close.marketing/
June 24, 2021 at 4:48 pm #1834089Leo
StaffCustomer SupportThat’s not a shortcode.
Tom’s function above should be added using one of these methods:
Adding PHP: https://docs.generatepress.com/article/adding-php/Just tested with the Code Snippets plugin and didn’t encounter any error:
Adding PHP: https://docs.generatepress.com/article/adding-php/Documentation: http://docs.generatepress.com/
Adding CSS: http://docs.generatepress.com/article/adding-css/June 24, 2021 at 11:26 pm #1834285David Pérez
I use child theme.
Web: https://en.davidperezgar.com/ | Work: https://close.marketing/
June 24, 2021 at 11:58 pm #1834306Elvin
StaffCustomer SupportI use child theme.
I assume you’ve added it to a child theme’s
functions.php
?Can you share a screenshot of the error and the contents of the functions.php file?
A wise man once said:
"Have you cleared your cache?" -
AuthorPosts
- You must be logged in to reply to this topic.