SHARE
TWEET

Remove 'View All Events in Category'

BakerMan Feb 10th, 2014 89 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2.  * This is a fairly crude bit of string manipulation relating to the
  3.  * event list widget.
  4.  *
  5.  * It could be enhanced though to also catch other strings like "View
  6.  * All Events" and to remove the <p>/<a> elements that surround them,
  7.  * if necessary. An alternative approach (to remove strings) could be
  8.  * a filter on the gettext hook.
  9.  *
  10.  * Targets TEC/ECP 3.4.x
  11.  */
  12.  
  13. add_action( 'tribe_events_before_list_widget', 'ob_start' );
  14. add_action( 'tribe_events_after_list_widget', 'custom_manipulate_eventlist_widget_output' );
  15.  
  16. function custom_manipulate_eventlist_widget_output() {
  17.         $widget_html = ob_get_clean();
  18.         echo str_replace( 'View All Events in Category', '', $widget_html );
  19. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top