Get Widget Options for Wordpress


/ Published in: PHP
Save to your folder(s)



Copy this code and paste it in your HTML
  1. function get_widget_option($option_name){
  2. $options = array_filter( get_option( $option_name ) );
  3. unset( $options['_multiwidget'] );
  4. foreach( $options as $key => $val ) {
  5. $options = $options[$key];
  6. }
  7. return $options;
  8. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.