Count widgets of a certain type

How can I get the number (count) of, let’s say, text widgets from a sidebar?

for eg. if I drop 4 text widgets in the sidebar, I want to get this number somehow from another widget

Related posts

Leave a Reply

1 comment