Setting the Site Icon programmatically?

[ad_1]

Is there a way in an FSE theme to set the Site Icon block? I have created an FSE theme that will be used for many sites, but the Site Icon will be the same. Right now it just has the blank placeholder for the Site Icon block in the header, then I have to go in and add the image after switching to the theme.

Is there a way to programmatically set the Site Icon in the theme files, so that it sets the Site Icon block, the favicon, and all the size options?

[ad_2]

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer