class WP_Widget – Different dashboard preview for custom widget
I try to create custom widget to display specified category latest-posts on home page.
Unfortunately outcome of my php code print a lot of html elements so on dashboard widgets page the preview is unneccessary huge. For example it display a featured images of listed posts.
Is there any solution to have different preview of my widget on dashboard in contrast to what my widget show on home page?
I tried in my php use
is_admin() function but it does not work.