WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. Bhuvnesh Gupta
    Member
    Posted 1 year 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 1 year 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 1 year ago #

    Thanks! @dullejohn

  4. ved88
    Member
    Posted 1 year ago #

    thanks for the code dude....

  5. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year 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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic