当前位置:首页文章笔记建站教程WordPress 自带官方字体图标全集

WordPress 自带官方字体图标全集

我们在开发 WordPress 主题时,会经常遇到使用 WordPress 自带图标的情况,可以直接调用也是非常方便。WordPress 管理后台使用,在 WordPress 管理后台菜单中添加图标,可以直接复制名称使用。例如,添加菜单代码中最后一个参数,填入使用图标名称即可:

  1. add_menu_page(‘主题设置’, ‘主题设置’, ‘administrator’, ‘theme_options_menu’, ‘theme_settings_admin’, ‘dashicons-admin-appearance’);

WordPress 网页前台使用,需要在插件或者主题代码中添加如下函数,让 WordPress 前台也加载 dashicons 样式,然后主题就可以直接使用。

  1. function get_dashicons(){
  2. wp_enqueue_style( ‘dashicons’ );
  3. }
  4. add_action( ‘wp_enqueue_scripts’, ‘get_dashicons’ );

前端调用

  1. <h2 class="dashicons-before dashicons-smiley">A Cheerful Headline</h2>
  2. <!– 或者 –>
  3. <li class="dashicons dashicons-menu-alt"><span>menu (alt)</span></li>

其中 H2 标签里的 Class 属性 dashicons dashicons-menu-alt 就是图表名称代码,是不是很简单,下面我们就给出 WordPress 自带官方字体图标集可以自行查阅,点击图标会弹出属性代码,复制放入自己的项目就可以了。

Admin Menu Admin Menu

  • menu
  • menu (alt)
  • menu (alt2)
  • menu (alt3)
  • site
  • site (alt)
  • site (alt2)
  • site (alt3)
  • dashboard
  • post
  • media
  • page
  • comments
  • appearance
  • plugins
  • plugins checked
  • users
  • tools
  • settings
  • network
  • home
  • generic
  • collapse
  • filter
  • customizer
  • multisite

Welcome Screen Welcome Screen

  • write blog
  • add page
  • view site
  • widgets menus
  • comments
  • learn more

Post Formats Post Formats

  • aside
  • image
  • video
  • status
  • quote
  • chat
  • audio
  • camera
  • camera (alt)
  • images (alt)
  • images (alt2)
  • video (alt)
  • video (alt2)
  • video (alt3)

section

Media Media

  • archive
  • audio
  • code
  • default
  • document
  • interactive
  • spreadsheet
  • text
  • video
  • playlist audio
  • playlist video
  • play
  • pause
  • forward
  • skip forward
  • back
  • skip back
  • repeat
  • volume on
  • volume off

Image Editing Image Editing

  • crop
  • rotate
  • rotate left
  • rotate right
  • flip vertical
  • flip horizontal
  • filter
  • undo
  • redo

Databases Databases

  • database add
  • database
  • database export
  • database import
  • database remove
  • database view

Block Editor Block Editor

  • align full width
  • align pull left
  • align pull right
  • align wide
  • block default
  • button
  • cloud saved
  • cloud upload
  • columns
  • cover image
  • ellipsis
  • embed audio
  • embed generic
  • embed photo
  • embed post
  • embed video
  • exit
  • heading
  • HTML
  • info outline
  • insert
  • insert after
  • insert before
  • remove
  • saved
  • shortcode
  • table col after
  • table col before
  • table col delete
  • table row after
  • table row before
  • table row delete

section

TinyMCE TinyMCE

  • bold
  • italic
  • unordered list
  • ordered list
  • ordered list RTL
  • quote
  • align left
  • align center
  • align right
  • insert more
  • spellcheck
  • expand
  • contract
  • kitchen sink
  • underline
  • justify
  • text color
  • paste word
  • paste text
  • remove formatting
  • video
  • custom character
  • outdent
  • indent
  • help
  • strikethrough
  • RTL
  • LTR
  • break
  • code
  • paragraph
  • table

Posts Screen Posts Screen

  • align left
  • align right
  • align center
  • align none
  • lock
  • unlock
  • calendar
  • calendar (alt)
  • visibility
  • hidden
  • post status
  • edit
  • trash
  • sticky

Sorting Sorting

  • external
  • arrow up
  • arrow down
  • arrow right
  • arrow left
  • arrow up (alt)
  • arrow down (alt)
  • arrow right (alt)
  • arrow left (alt)
  • arrow up (alt2)
  • arrow down (alt2)
  • arrow right (alt2)
  • arrow left (alt2)
  • sort
  • left right
  • randomize
  • list view
  • excerpt view
  • grid view
  • move

Social Social

  • share
  • share (alt)
  • share (alt2)
  • RSS
  • email
  • email (alt)
  • email (alt2)
  • networking
  • Amazon
  • Facebook
  • Facebook (alt)
  • Google
  • Instagram
  • LinkedIn
  • Pinterest
  • Podio
  • Reddit
  • Spotify
  • Twitch
  • Twitter
  • Twitter (alt)
  • WhatsApp
  • Xing
  • YouTube

section

WordPress.org WordPress.org

  • hammer
  • art
  • migrate
  • performance
  • universal access
  • universal access (alt)
  • tickets
  • nametag
  • clipboard
  • heart
  • megaphone
  • schedule
  • Tide
  • REST API
  • code standards

Buddicons Buddicons

  • activity
  • community
  • forums
  • friends
  • groups
  • pm
  • replies
  • topics
  • tracking

Products Products

  • WordPress
  • WordPress (alt)
  • Pressthis
  • update
  • update (alt)
  • screen options
  • info
  • cart
  • feedback
  • cloud
  • translation

Taxonomies Taxonomies

  • tag
  • category

section

Widgets Widgets

  • archive
  • tagcloud
  • text

Notifications Notifications

  • bell
  • yes
  • yes (alt)
  • no
  • no (alt)
  • plus
  • plus (alt)
  • plus (alt2)
  • minus
  • dismiss
  • marker
  • star filled
  • star half
  • star empty
  • flag
  • warning

Miscellaneous Miscellaneous

  • location
  • location (alt)
  • vault
  • shield
  • shield (alt)
  • sos
  • slides
  • text page
  • analytics
  • chart pie
  • chart bar
  • chart line
  • chart area
  • groups
  • businessman
  • businesswoman
  • businessperson
  • id
  • id (alt)
  • products
  • awards
  • forms
  • testimonial
  • portfolio
  • book
  • book (alt)
  • download
  • upload
  • backup
  • clock
  • lightbulb
  • microphone
  • desktop
  • laptop
  • tablet
  • smartphone
  • phone
  • index card
  • carrot
  • building
  • store
  • album
  • palm tree
  • tickets (alt)
  • money
  • money (alt)
  • smiley
  • thumbs up
  • thumbs down
  • layout
  • paperclip
  • color picker
  • edit large
  • edit page
  • airplane
  • bank
  • beer
  • calculator
  • car
  • coffee
  • drumstick
  • food
  • fullscreen (alt)
  • fullscreen exit (alt)
  • games
  • hourglass
  • open folder
  • PDF
  • pets
  • printer
  • privacy
  • superhero
  • superhero (alt)
温馨提示:

文章标题:WordPress 自带官方字体图标全集

文章链接:https://www.wuyanshuo.cn/844.html

更新时间:2022年05月27日

本站大部分内容均收集于网络!若内容若侵犯到您的权益,请发送邮件至:service@wuyanshuo.cn我们将第一时间处理! 资源所需价格并非资源售卖价格,是收集、整理、编辑详情以及本站运营的适当补贴,并且本站不提供任何免费技术支持。 所有资源仅限于参考和学习,版权归原作者所有,更多请阅读无言说网络服务协议

给TA打赏
共{{data.count}}人
人已打赏
建站教程

为WordPress添加“点击展开/收缩”短代码 功能

2022-5-27 23:07:23

建站教程

PHP 怎么连接 WordPress 数据库

2022-5-28 2:01:04

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
有新私信 私信列表
搜索
'