WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] Display Post Categories? (10 posts)

  1. Andrew Tegenkamp
    Member
    Posted 7 months ago #

    I followed the great tutorial at http://wp-events-plugin.com/tutorials/using-additional-custom-taxonomies/ but now I need to display the standard post categories in my template for events that have them.

    Can I do that with tags Events => Settings? If so, which tags? If not, which file(s) should I edit?

    Thanks,
    Andrew

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

  2. caimin_nwl
    NetWebLogic Support
    Posted 7 months ago #

    Hi Andrew,

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

  3. Andrew Tegenkamp
    Member
    Posted 7 months ago #

    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.

  4. angelo
    NetWebLogic Support
    Posted 7 months ago #

    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

  5. Andrew Tegenkamp
    Member
    Posted 7 months ago #

    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!

  6. caimin_nwl
    NetWebLogic Support
    Posted 7 months ago #

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

  7. Andrew Tegenkamp
    Member
    Posted 7 months ago #

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

  8. caimin_nwl
    NetWebLogic Support
    Posted 7 months ago #

    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.

  9. Andrew Tegenkamp
    Member
    Posted 7 months ago #

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

    Thanks,
    Andrew

  10. Andrew Tegenkamp
    Member
    Posted 7 months ago #

    I was actually able to look this up with http://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}
    ');

Reply

You must log in to post.

About this Plugin

About this Topic