[wordpress插件] Add URL Slugs as Body Classes将网址段添加为正文类

wordpress 插件 文章 2020-01-31 19:20 578 0 全屏看文

AI助手支持GPT4.0

评分

96

96

描述

This plug-in takes the URL, chops it into pieces, and adds each “piece” as an additional

此插件获取URL,将其切成碎片,并将每个“碎片”添加为附加的

class to the body tag.

类到 body 标记。

Meaning, if your page’s URL is:

意思是,如果页面的URL是:

http://www.example.com/2012/02/24/wordpress-plugin-add-url-slugs-as-body-classes/

http://www.example.com/2012/02/24/wordpress-plugin-add-url-slugs-as-body-classes/

Your page’s body tag would have at least these classes:
    

您页面的 body 标记至少应具有以下类别:
    

2012 02 24 wordpress-plugin-add-url-slugs-as-body-classess

2012 02 24 wordpress-plugin-add-url-slugs-as-body-classess

It gets much stronger when you start thinking about Categories or nested Pages:
    

当您开始考虑类别或嵌套页面时,它会变得更加强大:
    

http://www.example.com/category/wordpress/

http://www.example.com/category/wordpress/

which would add:
    

其中会添加:
    

category wordpress

类别wordpress

while:
    

时间:
    

http://www.example.com/movies/star-trek/wrath-of-khan/

http://www.example.com/movies/star-trek/wrath-of-khan/

would add:
    

会添加:
    

movies star-trek wrath-of-khan

电影星际迷航可汗之怒

This allows you to very easily add custom CSS and/or JS to these pages based on these new CSS classes.

这使您可以基于这些新的CSS类非常轻松地向这些页面添加自定义CSS和/或JS。

Please let me know if you have any questions/suggestions/thoughts,

如果您有任何疑问/建议/想法,请告诉我,

Atg

Atg

http://aarontgrogg.com/

http://aarontgrogg.com/

aarontgrogg@gmail.com

aarontgrogg@gmail.com

安装步骤

    1. Download the ZIP
    2. 下载ZIP

    3. Unzip the ZIP
    4. 解压缩ZIP

    5. Copy/paste the unzipped files into your WP plug-in directory (/wp-content/plugins/)
    6. 将解压缩的文件复制/粘贴到WP插件目录( / wp-content / plugins /

    7. From within WP’s Plugin Admin panel, Activate the plug-in
    8. 在WP的“插件管理”面板中,激活插件

    9. Write some wicked CSS to amaze your friends and befuddle your enemies…
    10. 编写一些邪恶的CSS来使您的朋友惊奇并迷惑您的敌人...

下载地址

https://downloads.wordpress.org/plugin/add-url-slugs-as-body-classes.1.3.zip

https://downloads.wordpress.org/plugin/add-url-slugs-as-body-classes.1.3.zip

-EOF-

AI助手支持GPT4.0


国内超级便宜服务器

摸鱼人热门新闻聚合

钻级赞助商 我要加入

开发者在线工具

第三方支付技术请加QQ群

相关文章
[wordpress插件] Back to top scroll返回顶部滚动
[wordpress插件] Add to Cart Button Custom Text添加到购物车按钮自定义文本
[wordpress插件] Delivery Area with Google MapsGoogle Maps的送货区域
[wordpress插件] Custom Shortcodes自定义简码
[wordpress插件] Advanced Custom Fields YITH WooCommerce Compare support高级自定义字段YITH WooCommerce比较支持
随便看看
企业微信通讯录账号被管理员误/恶意删除,怎么办? 8078
问题? 7403
如何快速搭建抽奖助手小程序(无需代码知识) 5085
许涛 大哥在吗, 要解冻小程序的时候提示信息主体不一致, 能帮忙看下吗? 6040
小程序搜一搜全称搜索不显示 麻烦解决一下!谢谢 5653
我的小程序广告收款主体是个体工商户,每个月邮寄两次发票很是麻烦,我年底的时候打包邮寄一次可以么? 5243
如何解决渲染层网络错误Failed to load media? 16597
小程序找号找回 释放昵称? 2448
我的小程序广告主收入5301,实际进账4406,是怎么回事呀? 2528
删除部分微信用户个人数据的通知,怎么删除? 5580