Viewing 9 replies - 1 through 9 (of 9 total)
  • Hi Andrew,

    You meant the Event Categories? You can do that with the #_CATEGORIES placeholder.

    Thread Starter Andrew Tegenkamp

    (@andrewteg)

    Thanks but no. I added the standard post categories (Dashboard => Posts => Categories) to Events using the tutorial link I mentioned originally.

    It works well in the Event Admin for assigning categories but now I want to display those categories in my Event template.

    Plugin Support angelo_nwl

    (@angelo_nwl)

    can I know what do you mean by “display those categories” ? is that you wanted to display events under this category or list this categories in your events page?

    thanks

    Thread Starter Andrew Tegenkamp

    (@andrewteg)

    Thanks for following up. I am hoping to learn how to list the categories in my events page.

    The tutorial actually showed me how to display events under the category and that works great!

    So you want to list the standard WP categories on the Events list page?

    Thread Starter Andrew Tegenkamp

    (@andrewteg)

    I want to list the standard WP categories for the event on each individual event page.

    If you’ve used the tutorial to “attach” events to your blog categories, you should be able to use the normal category tags like wp_list_categories. and so on.

    Thread Starter Andrew Tegenkamp

    (@andrewteg)

    Ok, great! My (hopefully) last question is what template file do I edit to add stuff like wp_list_categories?

    Thanks,
    Andrew

    Thread Starter Andrew Tegenkamp

    (@andrewteg)

    I was actually able to look this up with https://wp-events-plugin.com/documentation/using-template-files/ and then finding out how to change the call to output_single(). I ended up with something like this should it help others. My $cat_html is just custom formatted code using wp_list_categories and get_categories as suggested:

    echo $EM_Event->output('
    <div style="float:right; margin:0px 0px 15px 15px;">#_LOCATIONMAP</div>
    <p>
    	<strong>Date/Time</strong><br/>
    	Date(s) - #_EVENTDATES<br /><i>#_EVENTTIMES</i>
    </p>
    {has_location}
    <p>
    	<strong>Location</strong><br/>
    	#_LOCATIONLINK
    </p>
    {/has_location}
    <p>
    	<strong>Categories</strong>
    	'.$cat_html.'
    </p>
    <?php phpinfo(); ?>
    <br style="clear:both" />
    #_EVENTNOTES
    {has_bookings}
    <h3>Bookings</h3>
    #_BOOKINGFORM
    {/has_bookings}
    ');
Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Display Post Categories?’ is closed to new replies.