惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Blog — PlanetScale
Blog — PlanetScale
小众软件
小众软件
F
Fortinet All Blogs
博客园 - 叶小钗
博客园_首页
D
DataBreaches.Net
Apple Machine Learning Research
Apple Machine Learning Research
U
Unit 42
爱范儿
爱范儿
aimingoo的专栏
aimingoo的专栏
博客园 - Franky
Martin Fowler
Martin Fowler
酷 壳 – CoolShell
酷 壳 – CoolShell
The Cloudflare Blog
A
About on SuperTechFans
Google DeepMind News
Google DeepMind News
Microsoft Security Blog
Microsoft Security Blog
IT之家
IT之家
M
MIT News - Artificial intelligence
有赞技术团队
有赞技术团队
博客园 - 【当耐特】
S
SegmentFault 最新的问题
Hugging Face - Blog
Hugging Face - Blog

Roman Fink

暂无文章

How to add a link to the Customizer in your FSE theme – R...
idf8_0plsma7 · 2024-04-10 · via Roman Fink

In the FSE theme, there isn’t a direct link to the Customizer. While it might seem unnecessary, there’s a crucial aspect to consider: the Customizer is the most easiest way to update the favicon. Many users are accustomed to updating it this way, as opposed to using the Site Editor.

To clarify, I’m referring to the option where one might want to set up a favicon that’s different from the site logo in the Site Logo block.

Currently, the only method to accomplish this is through the Customizer. Of course, one can access it through the link /wp-admin/customize.php, but not all users of your theme might be aware of this.

To solve it, just paste this code into functions.php in your theme. This code snippet simply adds a submenu link to /customize.php under the appearance submenu. Nothing fancy 😌

PHP

function add_customize_menu_link() {
    add_submenu_page(
        'themes.php', // Parent menu slug (Appearance)
        'Customize', // Page title
        'Customize', // Menu title
        'manage_options', // Capability required to access
        '/customize.php' // URL to link to
    );
}

add_action('admin_menu', 'add_customize_menu_link');