SHARE
TWEET

Shortcode wrap for another shortcode for use within a format

eventsmanager Jun 22nd, 2017 147 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. /*
  3. This is an example of how you can wrap a shortcode with another shortcode, so you can use it on a formatting setting within Events Manager, since you can't include formats within a shortcode within a format as the higher format level parses everything first.
  4.  
  5. For instructions on how/where to use this code, see here - http://wp-events-plugin.com/tutorials/how-to-safely-add-php-code-to-wordpress/
  6. */
  7. function my_em_get_categories_shortcode_wrap(){
  8.     return do_shortcode('<ul>[categories_list hide_empty=0]<li>#_CATEGORYLINK</li>[/categories_list]</ul>');
  9. }
  10. add_shortcode ( 'categories_list_wrap', 'my_em_get_categories_shortcode_wrap' );
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