• GusGF

    (@gusgf)


    I’ve noticed that some icons don’t seem to appear in the WP editor e.g. below I cannot get the icon to appear yet if I change it to ‘dashicons-tickets’ an icon appears so why is it some icons work and some don’t?

    register_post_type('program', array('public'=>true,
                                            'label'=>'Programs',
                                            <strong>'menu_icon'=>'dashicons-instagram'</strong>,
                                            'rewrite'=>array('slug'=>'MyPrograms'),
                                            'has_archive'=>true, 
                                            'labels'=>array('name'=>'Programs', 
                                                            'add_new_item'=>'Add New Program',
                                                            'edit_item'=>'Edit Program', 
                                                            'all_items'=>'All Programs',
                                                            'singular_name'=>'Program'),
                                            'supports'=>array('editor','title','excerpt')
                                )
            );

    The page I need help with: [log in to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Moderator bcworkz

    (@bcworkz)

    Where in the editor are you expecting to see this? FWIW, the Instagram icon appears as expected in the admin menu for my CPT.

    Stef

    (@serafinnyc)

    I’m pretty sure you can’t wrap an icon within a CPT with anything extra. Plus your apostrophes are on the inside of all that anyway. Remove the strong and you’ll be all set.

    remove unwanted argument <strong>

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Dashicon not working’ is closed to new replies.