Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. /**
  2.  
  3.      * Renders the actual widget
  4.  
  5.      *
  6.  
  7.      * @param array $args
  8.  
  9.      * @param type $instance
  10.    
  11.  
  12.      */
  13.  
  14. public function widget($args, $instance)
  15.  
  16.     {
  17.  
  18.     extract($args, EXTR_SKIP);
  19.  
  20.     echo $before_widget;
  21.     echo '<div class="your-class" style="height:500px; overflow:auto;"><!--My custom html code goes here!-->';
  22.  
  23.     echo $instance['code'];
  24.  
  25.     echo '<br \>';
  26.  
  27.     while (have_posts()): the_post();
  28.         $cool = get_field('author_or_brand');
  29.         echo $cool . '<br \>';
  30.         $count++;
  31.         endwhile;
  32.         echo $count;
  33.  
  34.     echo '</div>'; 
  35.  
  36. echo $after_widget;
  37.     }
  38.  
  39. }