WordPress.org

Ready to get started?Download WordPress

Forums

The Events Calendar
[resolved] Simple Events Shortcode (2 posts)

  1. Bogdan
    Member
    Posted 1 year ago #

    Hi everyone,

    after some searching and playing around I finally managed to set up a simple shortcode to list events:

    function sc_list_events()
    {
    	ob_start();
    	query_posts('post_type=tribe_events');
    	tribe_get_template_part('list/content');
    	$content=ob_get_clean();
    	wp_reset_query();
    
    	return $content;
    }
    add_shortcode('list_events', 'sc_list_events');

    In combination with the templating possibilities found here http://tri.be/support/documentation/events-calendar-themers-guide/ you can customize everything as you need it.

    Have fun,
    Bogdan

    http://wordpress.org/plugins/the-events-calendar/

  2. Barry Hughes
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks Bogdan - that will definitely be useful for many :-)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic