Forums

Events Manager
[resolved] How to use 'Event Manager Shortcodes' plugin via the php code. (5 posts)

  1. Bhuvnesh Gupta
    Member
    Posted 4 months ago #

    I want to use many of the shortcodes via php code. e.g [events_calendar]

    http://wordpress.org/extend/plugins/events-manager/

  2. dullejohn
    Member
    Posted 4 months ago #

    An example of how to use it

    <?php echo do_shortcode('[events_list limit="10"]
    <ul class="event">
    	<li>
    		<img class="thumb" src=#_EVENTIMAGEURL />
    		<div class="details">
    			<h3>#_EVENTNAME</h3>
    			<p>#_EVENTDATES</p>
    			<p>#_EVENTTIMES</p>
    		</div>
    		<div class="description">
    			#_EVENTNOTES
    		</div>
    		<div class="description-toggle">See description</div>
    	</li>
    </ul>
    [/events_list]'); ?>
  3. Bhuvnesh Gupta
    Member
    Posted 4 months ago #

    Thanks! @dullejohn

  4. ved88
    Member
    Posted 4 months ago #

    thanks for the code dude....

  5. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 4 months ago #

    yup, that's how! alternatively, skip shortcodes and go to the 'source'

    EM_Events::output(array('limit'=>10, 'format'=>'placeholders etc.'));

    you may want to add the ul tags outside of both the shortcode example above and this one.

Reply

You must log in to post.

About this Plugin

About this Topic