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

推荐订阅源

K
Kaspersky official blog
Martin Fowler
Martin Fowler
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
V
Visual Studio Blog
博客园_首页
Engineering at Meta
Engineering at Meta
The Cloudflare Blog
MongoDB | Blog
MongoDB | Blog
Blog — PlanetScale
Blog — PlanetScale
T
The Blog of Author Tim Ferriss
雷峰网
雷峰网
D
Docker
博客园 - 司徒正美
S
SegmentFault 最新的问题
M
MIT News - Artificial intelligence
博客园 - 叶小钗
博客园 - 三生石上(FineUI控件)
U
Unit 42
J
Java Code Geeks
A
About on SuperTechFans
N
Netflix TechBlog - Medium
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
S
Security Affairs
I
Intezer
Cisco Talos Blog
Cisco Talos Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
B
Blog RSS Feed
P
Privacy & Cybersecurity Law Blog
T
Tenable Blog
T
Threatpost
H
Hacker News: Front Page
G
Google Developers Blog
博客园 - 【当耐特】
Hugging Face - Blog
Hugging Face - Blog
Apple Machine Learning Research
Apple Machine Learning Research
L
Lohrmann on Cybersecurity
大猫的无限游戏
大猫的无限游戏
Google DeepMind News
Google DeepMind News
A
Arctic Wolf
S
Secure Thoughts
GbyAI
GbyAI
NISL@THU
NISL@THU
S
Security @ Cisco Blogs
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Webroot Blog
Webroot Blog
C
CXSECURITY Database RSS Feed - CXSecurity.com
O
OpenAI News
Spread Privacy
Spread Privacy
Application and Cybersecurity Blog
Application and Cybersecurity Blog

WooCommerce教程 – 奶爸建站笔记

怎么删除WooCommerce产品价格显示 – 奶爸建站笔记 怎么修改WooCommerce的产品排序 – 奶爸建站笔记 给WooCommerce订单添加一个正在运输中的状态 – 奶爸建站笔记 免插件导出WooCommerce订单教程 – 奶爸建站笔记 自定义WooCommerce库存提示插件,修改Out of stock缺货提示 – 奶爸建站笔记 2025年最新PayPal注册教程,对接WooCommerce独立站收款 – 奶爸建站笔记 WooCommerce短代码大全,从任意位置调用商品信息 – 奶爸建站笔记
允许在WooCommerce的分类描述里面插入html代码和图片 – 奶爸建站笔记
Lee · 2022-10-10 · via WooCommerce教程 – 奶爸建站笔记

WooCommerce产品分类可以设置分类描述,部分主题会在前台调用显示分类描述内容,不少外贸网站都在通过使用分类描述来做页面SEO优化,但是默认情况下WooCommerce的分类描述只支持纯文字,不能使用html,也不能插入图片,我们可以通过下面的代码来实现WooCommerce分类描述支持html代码。

/** * Allow HTML in term (category, tag) descriptions */ foreach ( array( 'pre_term_description' ) as $filter ) { remove_filter( $filter, 'wp_filter_kses' ); if ( ! current_user_can( 'unfiltered_html' ) ) { add_filter( $filter, 'wp_filter_post_kses' ); } } foreach ( array( 'term_description' ) as $filter ) { remove_filter( $filter, 'wp_kses_data' ); }

来源地址:https://woocommerce.com/document/allow-html-in-term-category-tag-descriptions/ 另外还有一款插件没测试,感兴趣的可以试试看:Allow HTML in Category Descriptions 分类添加html权限 之后分类描述里面通过html代码就可以插入图片了。

🚀 看教程还是觉得迷茫?不如让我手把手带你

「WordPress建站陪跑」——从选域名、买主机,到装主题、上线发文,每一步都有我全程陪跑,少走弯路,直达目标。

👉 了解建站陪跑服务