Add option for sidebar paramater
-
Hey I posted this on your blog, but thought this might be a better place for it:
I’m wondering if it’s possible to add support for the sidebar id to be included for filtering. I know
id
is a paramater ofdynamic_sidebar_params
, but I can’t figure out how to integrate it.This is what I’d like be able to do:
function my_widget_output_filter( $widget_output, $widget_type, $widget_id, $sidebar_id ) { if ( 'categories' == $widget_type && 'primary-sidebar' == $sidebar_id ) { $widget_output = str_replace('before', 'after', $widget_output); } return $widget_output; } add_filter( 'widget_output', 'my_widget_output_filter', 10, 3 );
This would allow filtering on only specific widgets of specific sidebars instead of executing on every sidebar on the site.
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘Add option for sidebar paramater’ is closed to new replies.