1 | | I, too, would like to get a return variant of `dynamic_sidebar`. There's no easy way to get a count of WordPress widgets. I figured out a way using a hook for widgets, but I was stopped in my tracks yet again because the widget hooks won't fire off until the widgets are outputted, which is basically when `dynamic_sidebar` is ran. I need that count before calling `dynamic_sidebar`, but since it gets echoed out, I can't arrange the content appropriately. :( |
| 1 | I, too, would like to get a return variant of `dynamic_sidebar`. There's no easy way to get a count of WordPress widgets. I figured out a way using a hook for widgets, but I was stopped in my tracks yet again because the widget hooks won't fire off until the widgets are outputted, which is when `dynamic_sidebar` is called. I need that count before calling `dynamic_sidebar`, but since it gets echoed out, I can't arrange the content appropriately without having to use `ob_` functions. In fact, in this scenario, to get my desired result, I had to call `dynamic_sidebar` twice, once in an output buffer to count them, and second time to show the content. |