Advertisement
eventsmanager

Multiple Author

Feb 22nd, 2013
392
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement