• Jyos

    (@jyos)


    I was wondering how I might be able to output events of specific categories on certain pages via template files? For example If I have a category called Financial Services, I’d like to be able to output the most recent events on the Financial Services page.

    I know there is a shortcode [events_list], but i’d like to be able to customize the output in my template file. Is this possible? I’m having troubles following the placeholders implementation if that is where I should be looking…

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • Acts7

    (@acts7)

    First off, you know how to create a custom WordPress template right?

    1)Create a custom template.
    2)below the “the_content();” line
    3) follow along here:

    http://www.wp-events-plugin.com/documentation/advanced-usage/#highlighter_881707

    Just grab that first 3 lines of code.
    The array would be your args (arguments / filters if you will)

    In the array(
    Add

    , ‘category’ => 14,

    Or whatever category you want to display.
    There you have 10 events per page in that category.

    if (class_exists('EM_Events')) {
    	echo EM_Events::output( array(
    		'limit'=>10,
    		'orderby'=>'name',
    		'category'=>14
    	) );
    }

    If you want more than 10 events per page, increase the ‘limit’ to say 20

    PS If this resolves your issue – be sure to mark it as resolved in the upper right column.

    Thread Starter Jyos

    (@jyos)

    Hey Acts7,

    This part I’m able to do as well, but I was wondering how I can customize the actual output? It appears as a list, which is fine for the main events page, but on other pages i’d like to be able to output the data in let’s say individual divs, adding classes to the event name, etc.

    Sorry if I’m not explaining the situation too well, and thanks for the help 🙂

    Thread Starter Jyos

    (@jyos)

    Specifically, I’d like to be able to grab components of that output for me to style myself, like a custom wordpress query, where i’m able to drop <?php the_title(); ?> in a specific spot, or <?php the_excerpt(); ?> for example.

    Thread Starter Jyos

    (@jyos)

    Nevermind, figured out the solution via another forum post!

    echo EM_Events::output(array('format'=>
    '<a href="#_EVENTURL" border=0>$mycustomphpstuffiwantedherethatdoesntshowifiuseformats</a>
    <B>#_EVENTLINK</B><br/>#_EVENTDATES #_EVENTTIMES<BR/><i>#_LOCATIONNAME, #_LOCATIONADDRESS, #_LOCATIONTOWN </i><br/><a href="#_EVENTURL">Details & map</a><HR>',
     'limit'=>20, 'pagination'=>1));
    Acts7

    (@acts7)

    http://wordpress.org/support/topic/plugin-events-manager-break-up-show-events-per-datedate?replies=8#post-2707933

    Oh right right.
    Yes then, to make it easier on yourself split your format out as a variable.
    See my link on the pastebin above.

    particularly:

    [Code moderated as per the Forum Rules. The maximum number of lines of code that you can post in these forums is ten lines. Please use the pastebin]

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: Events Manager] Custom Template Output’ is closed to new replies.