I always like using this tutorial which would give you this code.
<?php
add_action( 'admin_head', 'cpt_icons' );
function cpt_icons() {
?>
<style type="text/css" media="screen">
#menu-posts-POSTTYPE .wp-menu-image {
background: url(<?php bloginfo('template_url') ?>/images/YOURIMAGE.png) no-repeat 6px -17px !important;
}
#menu-posts-POSTTYPE:hover .wp-menu-image, #menu-posts-POSTTYPE.wp-has-current-submenu .wp-menu-image {
background-position:6px 7px!important;
}
</style>
<?php } ?>
Related Posts:
- bootstrap 3 navbar collapse button not working
- Bootstrap Dropdown menu is not working
- JavaScript Loading Screen while page loads
- Bootstrap Dropdown menu is not working
- Bootstrap Dropdown menu is not working
- Click button copy to clipboard
- How to make html table vertically scrollable
- How to make Bootstrap carousel slider use mobile left/right swipe
- How to center image in carousel
- Bootstrap throws Uncaught Error: Bootstrap’s JavaScript requires jQuery
- Bootstrap carousel not sliding
- Can Twitter Bootstrap alerts fade in as well as out?
- Play/pause HTML 5 video using JQuery
- jQueryUI dialog width
- Random background images CSS3
- How do I remove a box-shadow effect from an element when another element is hovered?
- Slide right to left?
- Twitter Bootstrap Use Collapse in Custom Post Type
- Accordion scrolls page too low after clicking on the title [closed]
- WordPress Multiple Navigation bars
- Google yolo one tab signup plugin avilable in wordpress? [closed]
- jQuery Validation plugin and Bootstrap 4 CSS classes
- Getting click on item to open closest relevant element (popup) with jQuery
- How can publish my bootstrap created table ( huge amount of data) on my word-press theme?
- jQuery for Fade Preload Causes My Site Favicon to Disappear from Tab of Browser
- jQuery function not working in WordPress but works in jsfiddle
- Site images are fixed in front of my site content [closed]
- WP Media Uploader modal conflicts with Bootstrap modal
- can’t make jQuery work (change image on time interval) [closed]
- What is sr-only in Bootstrap 3?
- Set timeout for ajax (jQuery)
- How does the data-toggle attribute work? (What’s its API?)
- Use images like checkboxes
- Adding images to a Bootstrap Carousel with AJAX
- Bootstrap 4 images thumbnail classes
- Set selected option of select box
- Uncaught TypeError: Cannot read property ‘top’ of undefined
- TypeError: $(…).modal is not a function with bootstrap Modal
- How to make a simple image upload using Javascript/HTML
- Display XML content in HTML page
- How to center content in a Bootstrap column?
- how to center form using bootstrap 4
- Refresh/reload the content in Div using jquery/ajax
- vertical divider between two columns in bootstrap
- How to get height of div in px dimension
- How to display raw JSON data on a HTML page
- Table fixed header and scrollable body
- how to do a line break in Bootstrap 3.3.7
- Clear form fields with jQuery
- How to increase height of textarea using bootstrap rows and columns
- Bootstrap 3 Glyphicons CDN
- How to call a webservice method from an html page [javascript] with out refresh the page
- Javascript – ERR_CONTENT_LENGTH_MISMATCH
- How can I change the Bootstrap default font family using font from Google?
- Why is jquery show() not working in example
- Creating Accordion Table with Bootstrap
- $(document).ready(function() is not working
- Closing Bootstrap modal onclick
- Fully responsive HTML5 video
- Show div #id on click with jQuery
- How to make Bootstrap Panel body with fixed height
- Change navbar text color Bootstrap
- Twitter Bootstrap Modal Form Submit
- jQuery find element by data attribute value
- How to use aria-expanded=”true” to change a css property
- jQuery UI Datepicker not working
- Automatically decrease font size for long words
- How to properly add Bootstrap and JQuery Javascripts?
- How to use Bootstrap with WP’s jQuery? [closed]
- Show post in slider
- Override theme style with other CSS on a specific page
- Will the latest Bootstrap work properly with the default WordPress jQuery?
- How to Dynamically Load Content Into Body of Bootstrap Modal Window?
- show/hide div with simple jQuery script [closed]
- Using Bootstrap Switch with WordPress
- CSS – Initial HTML Margin Issue On WordPress Site
- What is the propre way to include jQuery UI Datepicker’s CSS in plugin?
- Adding a Calculator to a WordPress Page
- Adding a slide toggle on WordPress
- specifying relative file paths in WP with jQuery requests not working
- Bootstrap modal with jQuery post [closed]
- Recommended Use of Bootstrap, or JQuery-UI in WP/plugin development?
- Insert a Featured Video
- jQuery Drill Down iPod Menu FOUC and Selecting Current page
- WordPress and Modal Popup – how to make the already loaded javascript assets available in modal?
- Overriding inline !important CSS with Javscript code snippet with media query
- JQuery script working locally on desktop, not working on WordPress + Divi
- Unable to use Datepicker in a table when inserting a row
- Bootstrap News: Image Modifciation
- Lightbox scroll page down on iPhone
- how to allow download after newsletter subscription?
- Bootstrap Carousel Indicators Won’t Cycle On Custom WordPress Theme
- Bootstrap with separate js File
- How can I add the Post ID to Class Name in Jquery?
- All post attachments in gallery grid to full screen slideshow?
- :first-child applying to all links [closed]
- Why the slideshow is not shown in my theme?
- Drop Down Category Menu Not Working
- controlling the showing and hiding of the website logo
- Contact Form 7 – Submit Form not working After Ajax Request [closed]