It now supports using block.json, which aligns with WordPress core’s preferred method for block registration. Building ACF blocks with block.jsonĪCF 6.0 includes a major improvement to the way blocks are built. This post will focus on one of the most straightforward ways of implementing dark mode, using Angular and modern CSS features. This feature may look very simple to the end users, but it takes some additional effort to correctly implement in a web application. ACF lets you build Gutenberg blocks fast, efficiently, and with PHP. Light / Dark mode toggle is a very common feature in today's web applications. Typically it’s because I built a custom block… Building a block with Advanced Custom FieldsĬustom blocks make the new WordPress block editor even more powerful. While I try to support all the core blocks in the themes I build, sometimes it makes sense to remove a few. WPForms‘ simple drag-and-drop form builder allows… How to remove core WordPress blocks Integrate ConvertKit and WPForms easily connects forms on your website to your ConvertKit email marketing account, enabling you to capture more leads and manage campaigns more effectively. Let's Talk Other articles in this series How to Setup ConvertKit with a WordPress Form I build custom WordPress websites that look great and are easy to manage. There are still many browsers that don’t support SVG favicons so you’ll want a fallback. It seems that the SVG favicon is prioritized over the WP generated one regardless of whether it appears before or after it in the page markup, but I have the priority set to 100 so it will appear after, just in case.Įven with this approach, you should upload a JPG version of the favicon in the WordPress customizer. I added my favicon.svg to my theme’s /assets/images/ directory, but you can add it anywhere in your theme.Īdd the following code to your theme’s functions.php file to include the SVG favicon. You can use ( prefers-color-scheme: dark ) to style the dark mode version differently. Remove any styling from the shapes in the SVG (so the fill and stroke attributes) and add those styles with inline CSS. Create SVG faviconĬreate a square SVG with your desired icon. You can see this in use in the recent NerdPress redesign we just launched. When the favicon color doesn’t work well with dark mode, a common fix is to replace the transparent PNG with a JPG that has a white background, but then you end up with a white square in dark mode.Īlternatively, you can use an SVG for the favicon and modify the favicon styling based on the color scheme.
0 Comments
Leave a Reply. |