0
votes
1answer
16 views

What's the right way to share data between widgets?

I've got a few custom widgets in my site, which I'm targeting to specific tags. There may be a case where there may be an overlap in widget targeting, and the desirable behaviour may be to only show ...
0
votes
1answer
54 views

key( $GLOBALS['wp_registered_sidebars'] ) is always showing the same value

I am using this code from another answer add_action( 'dynamic_sidebar', 'wpse_96681_hr' ); function wpse_96681_hr( $widget ) { static $counter = 0; // right sidebar in Twenty Ten. Adjust ...
2
votes
1answer
349 views

Pass variables from one widget to another widget

I wrote a widget but I need to use the variables from one widget in another...both widgets are in the same dynamic sidebar. This is what I am trying to do: I wrote a widget that adds a footer to the ...
0
votes
1answer
499 views

How to show avatar of current logged in user in a widget

I have a php widget, and I need to show the avatar of the current logged in user, and I'm calling this code: <?php echo get_avatar(); ?> But its only outputting the default avatar. Is there a ...
1
vote
1answer
759 views

How/where is the global variable $wp_registered_widgets filled?

I have a problem of widgets not showing up, trying to investigate why $wp_registered_widgets is empty. Can somebody tell me where it gets filled from the database? How can I find out why the default ...