Quantcast
Channel: WordPress › Support » Forum: Hacks - Recent Topics
Viewing all articles
Browse latest Browse all 8245

russgrue on "mywidgetclass::widget gets called in admin pages."

$
0
0

Hey, I'm not sure if this is the right place to ask this but I've discovered that when I browse around the admin pages my widget display function in mywidgetclass is getting called. I've noticed this because the when the function gets called a counter is incremented.

The widget is called in several sidebars in the theme and while browsing the admin pages each time the widget is supposed to display (on the site) it is also called in the admin page.

I've tried wrapping the widget display function in a:
if (is_admin()) {
}
but this doesn't appear to work.

Is there something I can test for or some other way to prevent my widgets getting called on admin pages?

Thanks
Russ


Viewing all articles
Browse latest Browse all 8245

Trending Articles