Skip to main content
4 events
when toggle format what by license comment
Dec 13, 2022 at 13:17 comment added Sylvester DeMouser I absolutely want to use FSE. Fairly new to wordpress customization, it's unfortunate the documentation seems to take the reader in circles, and doesn't specify whether it's referencing pre FSE. it's a lot of wasted time for everyone (including you, replying to this!) I've literally been working at this for days, and this is the first I've learned that the add_settings_field approach is outdated. Your advice is definitely helpful. Thank you.
Dec 13, 2022 at 12:19 comment added Jacob Peattie No, you don't need any fields. If underscores already registers support then the field should already be in the customiser (under Site Identity), you just need to take care of the output part. Really, if you're not creating a block theme you should at least be using the Customiser for everything these days.
Dec 13, 2022 at 12:14 comment added Sylvester DeMouser so, i wouldn't put any form fields in the functions.php file for adding a logo? function customtheme_display_logo() { $custom_logo_id = get_theme_mod('customtheme_logo'); $logo = wp_get_attachment_image_src($custom_logo_id, 'full'); if (has_custom_logo()) { echo '<img src="' . esc_url($logo[0]) . '" alt="' . get_bloginfo('name') . '">'; } else { echo '<h1>' . get_bloginfo('name') . '</h1>'; } } add_action('admin_init', 'customtheme_display_logo'); i'm using underscores theme, which has add_theme_support( 'custom-logo' );
Dec 13, 2022 at 12:07 history answered Jacob Peattie CC BY-SA 4.0