eventsmanager

Multiple Author

Feb 22nd, 2013
209
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /**
  2. This snippet will create new event placeholder to display multiple authors of the event.
  3.  
  4. might be possible using custom codes and plugins:
  5.  
  6. 1. download and install wp plugin Co-Authors Plus
  7.  
  8. once installed; you can now create events with multiple authors
  9.  
  10. 2. open your theme functions.php and paste this snippet
  11.  
  12. */
  13. add_filter('em_event_output_placeholder','my_em_placeholder_mod_add_event_contact',1,3);
  14. function my_em_placeholder_mod_add_event_contact($replace, $EM_Event, $result){
  15. if ( $result == '#_EVENTMULTIPLEAUTHOR' && function_exists('coauthors_posts_links') ) {
  16. $replace = coauthors_posts_links( null, null, null, null, false );
  17. }
  18. return $replace;
  19. }
  20. Usage: you can now use placeholder #_EVENTMULTIPLEAUTHOR
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×