第六个参数就是可以直接使用 Dashicons 图标:add_menu_page('页面标题', '菜单名称', 'manage_options', 'my-page', 'my_admin_page_function', 'dashicons-admin-media');不过 add_menu_page 函数不支持 remixicon,如果要让自定义的菜单支持 remixicon 的话,那就要用 WPJAM Basic 的添加菜单的函数 wpja...
点击上图中菜单项的“SELECT Icon”按钮,就会弹出一个选择窗,让你选择该菜单的图标: 下面就是设置好图标之后的效果:
该函数的使用范例:将 menu-icon-site 这个图标添加到别名为 example-menu 的菜单中 functioncreate_example_menu(){ $menu_slug='example-menu'; add_menu_page( 'Example Menu', 'Example Menu', 'read', $menu_slug, '__return_null'//Will result in an empty page. ); set_menu_icon_class($menu...
注册文章类型的时候,如果要自定义文章类型在后台左侧菜单的图标,可以指定menu_icon的参数为 dashicons: 代码语言:javascript 代码运行次数:0 复制 Cloud Studio代码运行 add_action('init',function(){register_post_type('acme_product',array('label'=>'Products','public'=>true,'has_archive'=>true,'menu_ico...
/images/casestudy-icon.png) no-repeat 6px -32px !important; } #menu-posts-parceria:hover .wp-menu-image, #menu-posts-casestudy.wp-has-current-submenu .wp-menu-image { background-position:6px 0px !important; } #icon-edit.icon32-posts-parceria {background: url(...
'menu_icon' => 'dashicons-book', 或者,您可以将图像图标添加到您的媒体库并使用图标的 URL 而不是 CSS 类: 'menu_icon' => 'http://www.example.com/wp-content/uploads/2022/08/your-cpt-icon.png', 这些片段中的额外空格是有意的,当您将代码粘贴到上面较大的代码块中时,将确保代码整齐排列。 请...
'menu_icon' => 'dashicons-book', 'publicly_queryable' => true, 'show_ui' => true, 'show_in_menu' => true, 'query_var' => true, 'rewrite' => array( 'slug' => 'story' ), 'capability_type' => array ( 'story', 'stories' ), ...
function_namethat is called when the menu is clicked for displaying the options page. icon_urlis the path to the icon that you want to display next to your menu item. positionis where the menu should be added in relation to the other menus in the WordPress Dashboard. ...
你应该通过浏览器提供的工具将网页显示为移动端(每个浏览器的设置不尽相同),一般会在代码窗口会有个手机屏幕小icon,点击即可调出设备分辨率设置界面 ,将设备设置为其中一款手机即可。 然后,您需要找出WordPress导航菜单使用的标识符和CSS类。您可以通过在源代码上移动鼠标直到菜单区域突出显示。
icon: false, type: 'menubutton', menu: [ { text: 'Item 1', menu: [ { text: 'Pop-Up', onclick: function() { editor.windowManager.open( { title: 'Insert Random Shortcode', body: [ { type: 'textbox', name: 'textboxName', label: 'Text Box', value: '30' }, { type: 'te...