Reputation: 1959
I have a custom post_type created in wordpress admin control panel. all is working just fine except the menu_icon
'menu_icon' => get_stylesheet_directory_uri() . '/images/my_menu_icon.png',
it's not loading at all... the image file is located in my_theme/images
is there a code instead to use the template directory for the menu_icon? or do i need to save the image file somewhere else?
I have no clue..
thanks!
Upvotes: 0
Views: 1689
Reputation: 1959
I finally figured out what is wrong.
Never name you theme with a space (%20). As the local host wont recognize it within the functions.php when using the template directory or stylesheet uri.
So both code will work for the menu icon display.
Cheers!
Upvotes: 1
Reputation: 1483
Try this:
'menu_icon' => get_bloginfo('template_directory'). '/images/my_menu_icon.png',
Upvotes: 1