Theme.json: creating different sections of the color palette

No, writing as of WordPress 6.0 there is no API for defining additional palette sections. The colour palette component hardcodes 3 PaletteEdit sub-components, theme, default, and custom, where custom is for user defined colours. No dynamic fields or slotfills are provided for extending or adjusting these. Here is the current code: return ( <VStack className=”edit-site-global-styles-color-palette-panel” … Read more

Why don’t ‘wp_nav_menu’ CSS classes work until a menu is created?

This is due to the wp_nav_menu parameter fallback_cb: If the menu doesn’t exist, a callback function will fire. Default is ‘wp_page_menu’. Set to false for no fallback. You have not specified an alternative, so it uses the default, wp_page_menu. You could create your own function to display a page menu with the proper markup, or … Read more

How to store the_post_thumbnail() value in a variable

With a tiny bit of research, I’m pretty sure you could have created this yourself: $featimage = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), ‘full’ )[0]; $printable_url=”<img src=”” . $featimage . ‘”>’; echo $printable_url; Edit: Since PHP 5 is defunct, you can reference the first node in the array ([0]) directly. No need for intermediate storage of the full array.