• I’m using the Starkers WP Theme.

    I’m trying to add custom post to the theme, I am having a little problem. Trying to add custom icons to the new custom post fields and it’s not working.

    What happens when I try adding the icon the old icon disappears and the space just stay’s blank?

    Here is the code that I am using could someone look it over and see if I did something wrong?

    // Add new post type for Freemasons Secrets
    add_action(‘init’, ‘freemasonssecrets_init’);
    function freemasonssecrets_init()
    {
    $freemasonssecrets_labels = array(
    ‘name’ => _x(‘Freemasons Secrets’, ‘post type general name’),
    ‘singular_name’ => _x(‘Freemasons Secrets’, ‘post type singular name’),
    ‘all_items’ => __(‘All Freemasons Secrets’),
    ‘add_new’ => _x(‘Add new freemason secret’, ‘freemasons secrets’),
    ‘add_new_item’ => __(‘Add to Freemasons Secrets’),
    ‘edit_item’ => __(‘Edit Freemasons Secrets’),
    ‘new_item’ => __(‘New Freemasons Secrets’),
    ‘view_item’ => __(‘View Freemasons Secrets’),
    ‘search_items’ => __(‘Search in Freemasons Secrets’),
    ‘not_found’ => __(‘No recipes found’),
    ‘not_found_in_trash’ => __(‘No recipes found in trash’),
    ‘parent_item_colon’ => ”
    );
    $args = array(
    ‘labels’ => $freemasonssecrets_labels,
    ‘public’ => true,
    ‘publicly_queryable’ => true,
    ‘show_ui’ => true,
    ‘query_var’ => true,
    ‘rewrite’ => true,
    ‘capability_type’ => ‘post’,
    ‘hierarchical’ => false,
    ‘menu_position’ => 2,
    ‘supports’ => array(‘title’,’editor’,’author’,’thumbnail’,’excerpt’,’comments’,’custom-fields’),
    ‘has_archive’ => ‘Freemasons Secrets’
    );
    register_post_type(‘freemasonssecrets’,$args);
    }

    // Add new Custom Post Type icons for Freemasons Secrets
    add_action(‘admin_head’, ‘freemasonssecrets_icons’);
    function freemasonssecrets_icons() {
    ?>
    <style type=”text/css” media=”screen”>
    #menu-posts-freemasonssecrets .wp-menu-image{
    background: url(<?php bloginfo(‘url’) ?>/images/masonicsymbol.png) no-repeat 6px !important;
    }
    .icon32-posts-freemasonssecrets{
    background: url(<?php bloginfo(‘url’) ?>/images/MasonicSymbol_L.png) no-repeat !important;
    }
    </style>
    <?php }

    ?>

    Thanks

Viewing 1 replies (of 1 total)
  • Thread Starter 1_Knight

    (@1_knight)

    Still using the starkers theme. But now I’m working on a new site and am having the same problem with not being able to change the custom post icons.

    I’ve stopped trying to change them all but am having not luck at all?

    here is the code that I am using.
    // Add new Custom Post Type icons
    add_action( ‘admin_head’, ‘premier_boxers_icons’ );
    function premier_boxers_icons() {
    ?>
    <style type=”text/css” media=”screen”>
    #menu-posts-ourboys .wp-menu-image{
    background: url(<?php bloginfo(‘url’) ?>/images/photosmall.png) no-repeat !important;
    }

    </style>
    <?php }

    ?>

    I have tried to use different ones that some people have posted online but they don’t work ether??

    Has anyone else had this problem with starkers? Or anything like this??

    Thanks.

    It does remove the icon for the post but just leaves an empty space.

Viewing 1 replies (of 1 total)
  • The topic ‘Custom Post Icons not showing in Starkers Theme’ is closed to new replies.