Wordpress Custom Theme Settings
I am creating a custom theme from scratch and I get some rendering issues with Gutenberg I do not understand (I do not wants to custom or create new blocks for now, just using the core rendering).
I am running the last wordpress release (Version 5.4)
Gutenberg style was not loaded at all.
First and like explained in many post I added the following code
But that did not work (I do not understand why, the debug show me it is going throw this code)
So I added the code :
I am not sure I should reference the core directory like this, but I did not found a better way.
This looks to work for some blocks (like text, media with text or calendars,…)
but some others like image are still not rendering correctly (specially with the width to make a circle, or the caption still on the left).
But still not working.
Does someone could help me on this?
I also would like to include standard core Gutenberg front end style in my sass (using Zurb foundation site)
Is there a way ? maybe I am wrong, I found the Gutenberg sass but looks to me this is more for the editor side (I did not really trained to Gutenberg yet, just want to include the standard in my project for now)
Wordpress Custom Theme Design
Do you use wp_head() function in <head> in header.php?
All this css and js files you needed are added through this hook.
“add_theme_support(‘wp-block-styles’);” is for “/wp-includes/css/dist/block-library/theme$suffix.css”. You can see this small css file to find if you need this in a first place.
And it looks like “/wp-includes/css/dist/block-library/style.min.css” has no need to add support or other dependencies from theme. It hooked through “wp_head” – “wp_enqueue_scripts” – “wp_common_block_scripts_and_styles”. Maybe you unregistered some action. You can try to turn off as much functionality as you can to find what causes the problem.
And it looks like “/wp-includes/js/dist/block-library.min.js” is needed only in editor.
You can keep two installations for easy to compare… )
To make function.php easy to read, you can put all code in separate files according to its functions and use PHP function require_once() to get them with comments where and what )
- The topic ‘custom theme : Front end Gutenberg core style’ is closed to new replies.
Wordpress Custom Theme Tutorial
Get a custom Wordpress theme designed by the professional designers at 99designs. No templates, original designs, quality guaranteed. Pages in WordPress are generally used to write permanent and little variable content, but they can also be used to create a custom design to give a particular appearance to each type of page, thanks to the possibility that WordPress offers to create a custom page. WordPress Theme Development Delivering unparalleled WordPress themes to our clients for the last 10 years, our dedicated theme development team is known to create exceptional, clean and responsive WordPress Themes that are ideal for your needs. Mar 15, 2021 Sydney is a powerful business theme that provides a fast way for companies or freelancers to create an awesome online presence. As well as being fully compatible with Elementor, Sydney brings plenty of customization possibilities like access to all Google Fonts, full color control, layout control, logo upload, full screen slider, header image, sticky navigation and much more. A WordPress Theme has many benefits, too. It separates the presentation styles and template files from the system files so the site will upgrade without drastic changes to the visual presentation of the site. It allows for customization of the site functionality unique to that Theme.