Advertisement
eventsmanager

Shortcode wrap for another shortcode for use within a format

Jun 22nd, 2017
797
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.64 KB | None | 0 0
  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' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement