Cannot access variables within a widget

This is more of a pure PHP than WordPress. You are implicitly creating $ranNum as local variable in function scope. $Example_Widget won’t access widget instance in PHP. What you should be using is $this->ranNum, for reading and writing. That will create object’s property implicitly, but you likely should declare it explicitly in your class definition … Read more

How do I add a class to all sidebars to let a Google Custom Search Engine know not to index the content?

If you want to add a class before each widget you should use the dynamic_sidebar_params filter. Another post explains this well. Here’s the gist of it. function uft_add_nocontent_class($params) { $params[0][‘before_widget’] = ‘<aside id=”%1$s” class=”widget %2$s nocontent”>’; return $params; } add_filter(‘dynamic_sidebar_params’, ‘uft_add_nocontent_class’); Otherwise, go and edit your child theme files. If you don’t have a lot … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)