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

推荐订阅源

J
Java Code Geeks
腾讯CDC
Jina AI
Jina AI
博客园 - 司徒正美
博客园 - 三生石上(FineUI控件)
Apple Machine Learning Research
Apple Machine Learning Research
GbyAI
GbyAI
WordPress大学
WordPress大学
Hugging Face - Blog
Hugging Face - Blog
T
The Blog of Author Tim Ferriss
小众软件
小众软件
M
MIT News - Artificial intelligence
MyScale Blog
MyScale Blog
D
Docker
H
Hackread – Cybersecurity News, Data Breaches, AI and More
Google DeepMind News
Google DeepMind News
月光博客
月光博客
L
LangChain Blog
F
Fortinet All Blogs
Microsoft Azure Blog
Microsoft Azure Blog
博客园 - Franky
C
Check Point Blog
U
Unit 42
人人都是产品经理
人人都是产品经理

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');