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]
- How do I link a JavaScript file to a HTML file?
- How can I scroll to an element using jQuery?
- What is sr-only in Bootstrap 3?
- Change Background color (css property) using Jquery
- JavaScript runtime error: ‘$’ is undefined
- 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
- Force a default browser on my android phone using a simple html shortcut page
- Bootstrap 4 images thumbnail classes
- Set selected option of select box
- jQuery.addClass not working
- Uncaught TypeError: Cannot read property ‘top’ of undefined
- TypeError: $(…).modal is not a function with bootstrap Modal
- Why is the jquery script not working?
- How to make a simple image upload using Javascript/HTML
- How to Show External website inside another page without iFrame? [closed]
- Display XML content in HTML page
- How to center content in a Bootstrap column?
- How to give spacing between buttons using bootstrap
- how to center form using bootstrap 4
- How can I override Bootstrap CSS styles?
- Refresh/reload the content in Div using jquery/ajax
- How to change the background-color of jumbrotron?
- vertical divider between two columns in bootstrap
- How to get height of div in px dimension
- vertical-align with Bootstrap 3
- 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
- Bootstrap collapse isn’t working; hamburger menu not showing up
- Clear form fields with jQuery
- How to increase height of textarea using bootstrap rows and columns
- Bootstrap Columns Not Working
- Set bootstrap modal body height by percentage
- 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
- jQuery scrollTop() method not working
- Set textarea width to 100% in bootstrap modal
- Creating Accordion Table with Bootstrap
- Bootstrap and jQuery error: $ is not defined
- WordPress and Modal Popup – how to make the already loaded javascript assets available in modal?
- Add other class content with reference class value
- Overriding inline !important CSS with Javscript code snippet with media query
- JQuery script working locally on desktop, not working on WordPress + Divi
- How to make jquery slider to start afresh [closed]
- Unable to use Datepicker in a table when inserting a row
- How can I get this menu container to be the height of the contents?
- How Do I change Markup of a link in WordPress
- 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
- How can I add a new lib path without call each one on the header?
- 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]
- Possible jquery / library conflict in plugin usage
- Why the slideshow is not shown in my theme?
- How to update scrollbar when using Jetpack’s Inifnite Scroller?
- Hide input field when second input field is in focus
- Drop Down Category Menu Not Working
- Element works, but not on wordpress site [duplicate]
- controlling the showing and hiding of the website logo
- How do I add Javascript and CSS files into WordPress?
- Contact Form 7 – Submit Form not working After Ajax Request [closed]