• Hello guys!

    I’m currently trying to figure out a way to grab and edit all of the content for running widgets on a website, I was only able to do this with wp text widget, but my main question is how do I do it for custom widgets?

    For widget_text content I was using code below, but as I said earlier this only changes content for text widget:

    add_action( 'plugins_loaded', 'change_widget' );
    function change_widget(){
    	//add_filter( 'dynamic_sidebar_params', 'jmk_widget' );
    	add_filter( 'widget_text', 'jmk_widget', 99 );
    }

    The commented line gets all of the widgets and few parameters, but I didn’t quite figured out If I can change it’s output with this.

    Thank you for any help in advance!

Viewing 3 replies - 1 through 3 (of 3 total)
  • what ‘custom’ widgets exactly?

    do these widgets apply a filter before returning the output?

    Thread Starter eSas

    (@esas)

    By custom I meant widgets that don’t come by default with wordpress themes, the idea is to get widgets content with applied filters, then override it with my filter. I hope I explained better this time.

    totally depends on each individual widget, and how it is coded.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Get Custom Widget Contet’ is closed to new replies.