Skip to:
Content
Pages
Categories
Search
Top
Bottom

how to change admin menu icon for replies and activity


  • Ameer hamza
    Participant

    @ameer-hamza

    how to change admin icons for replies and activity here is the screenshot

    http://prntscr.com/c8573z
    ————————-
    i tried this code but not working

    add_action( 'admin_menu', 'gowp_admin_menu' );
    function gowp_admin_menu() {
      global $menu;
      foreach ( $menu as $key => $val ) {
    if ( 'Activity' == $val[0] ) {$menu[$key][6] = 'dashicons-performance';}
    if ( 'Replies' == $val[0]) {$menu[$key][6] = 'dashicons-performance';}
      }
    }
    

    regards,
    Ameer

Viewing 1 replies (of 1 total)

  • danbp
    Participant

    @danbp

    Try this one which use CSS – and is working !

    Add the snippet to child-theme’s functions.php

    function replace_some_admin_menu_icons() {
    
    // dashicons-performance = f311
    // dashicons-smiley = f527
    // adminmenu is the ul ID
    // the second ID is the li
    // div is where the icon goes
    ?>
    
    <style type="text/css">
    
    #adminmenu #toplevel_page_bp-activity div.wp-menu-image:before {
      content: '\f311';
    }
    
    #adminmenu #menu-posts-reply div.wp-menu-image:before {
      content: '\f527';
    }
    </style>
    
    <?php } 
    add_action( 'admin_head', 'replace_some_admin_menu_icons' );

    Reference: WordPress Dashicons

Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar