Question

I've setup an "album" custom post type and want to add an icon on the index page where the RED circle is (see image below; from wptheming.com).

Here's my function to replace the icon. The CSS is what I found when I inspected the icon element with firebug:

add_action('admin_head', 'album_foo');
function album_foo() {
        global $post_type;
    ?>
    <style>
    <?php if ($post_type == 'album') : ?>

     #icon-album.icon32.icon32-posts-album {
      background:url('<?php get_template_directory_uri(); ?>/images/album32x32.png') no-repeat;
    } 
    <?php endif; ?>
        </style>
        <?php
}

I also tried this CSS in the function:

#icon-edit.icon32-posts-album {
        background:url('<?php get_template_directory_uri(); ?>/images/album32x32.png') no-repeat;
}

I can't figure out what my CSS is missing, but my icon isn't showing.

enter image description here

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with wordpress.stackexchange
scroll top