• I have a custom theme using bootstrap and my own CSS. I have a single.php file for single posts. However, when I write a post in the front-end Gutenberg and change the colours, text allignment, drop caps, or anything else, the changes do not appear in the website. Only making the next bold works in Gutenberg.

    Does anyone know what the problem could be?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    The block editor often strips out inappropriate tag attributes. Style selections through the UI are OK, but manually added element styles could get stripped out. In any case it’s often better to specify an additional CSS class, then style that class appropriately through Additional CSS or theme stylesheets.

    If you made CSS changes to your theme files, those files are often aggressively cached. You may need to flush any caches (both browser and server) to see CSS changes.

    You might try using your browser’s element inspector tool to figure out why your CSS is not being applied.

    Thread Starter boburn2020

    (@boburn2020)

    @bcworkz I am not sure what you mean with “You may need to flush any caches (both browser and server) to see CSS changes.”. Could you please ellaboate.

    Furthermore, am I correct in saying that I should then remove any styling related to page.php and the formatting of posts/pages but can still keep css in style.css that alter the header/footer designs?

    Moderator bcworkz

    (@bcworkz)

    Do you intend to distribute your theme to others, or is it for your own specific site? For your own site, do whatever works for you ?? For others, you should consider usability. Ideally, users shouldn’t need to be concerned with styling. They would add content and it’d look awesome right away with no additional effort. Typically, the more people fiddle with content appearance, the worse it becomes. Pages with 8 different fonts in multiple colors and sizes will look amateurish.

    All basic styling should be in style.css. If any content specific styling is needed, the styles available through the block editor UI should be relied on. Those are pretty extensive as they are. You shouldn’t try to manually enter your own style attributes via the code editor. As a last resort, one could add an additional CSS class and related rules in Additional CSS of the customizer. Then the same class/style can be easily reused elsewhere.

    The specifics for flushing the browser cache depends on the browser. Do a general internet search to see instructions for your particular browser. On the server, if you have a WP caching plugin, how to flush it again depends on the plugin. There ought to be a settings page button or admin bar item to clear or flush the cache. If your host has setup caching on their accounts, there’ll be some way to flush or clear the cache from your hosting account. Similar for 3rd party caching like Cloudflare, there’d be a way through the related account.

    Your browser cache is most likely the cause of stale data. Your host providing server caching is least likely.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Gutenberg design not appearing in website’ is closed to new replies.