Ready to get started?Download WordPress


[resolved] v3.4 problem on iPad 3rd gen - custom admin icons for CPT (3 posts)

  1. cubecolour
    Posted 2 years ago #

    I use a simple custom plugin to adds a custom post type to use with a slideshow plugin. In addition to setting up the CPT it also adds a custom 32x32px icon to the top of the CPT page and an image sprite for menu icons (B/W version & colour version for hover & selected states) in the admin using a function to add the following css to admin:

    #menu-posts-slide .wp-menu-image {
        background: url(<?php echo plugins_url() ?>/cc-slider-custom-post-type/images/slide-icon16.png) no-repeat 6px -16px !important;
    #menu-posts-slide:hover .wp-menu-image,
    #menu-posts-slide.wp-has-current-submenu .wp-menu-image {
        background-position:6px 8px !important;
    #icon-edit.icon32-posts-slide {
        background: url(<?php echo plugins_url() ?>/cc-slider-custom-post-type/images/slide-icon32.png) no-repeat;

    It worked fine in WP v3.32 on all browsers I tested on, and after updating WP to v3.4 still appears fine on desktop browsers & iPhone 3GS, however the icons no longer show correctly on the iPad (3rd Gen).

    Is the menu output differently for the iPad? I've not managed to do a "view source" to find out.

    Is there a better/recommended way to add the icons for a custom post type to get the hover/selected state?

  2. cubecolour
    Posted 2 years ago #

    Found the answer - it's due to the retina display

    easily fixed by adding some css for double resolution images to be presented to a retina display

    #icon-edit.icon32-posts-slide {
    background: url(<?php echo plugins_url() ?>/cc-slider-custom-post-type/images/slide-icon-color-64.png) no-repeat;
    background-size: 32px 32px;
    height: 32px;
    width: 32px;

    Thanks to Josh Byers on the StudioPress blog: http://www.studiopress.com/design/css-background-size-graphics.htm

  3. Little Boy Running
    Posted 2 years ago #

    Thanks for this. Will try soon.

Topic Closed

This topic has been closed to new replies.

About this Topic