Thanks for a very useful plugin. One problem I have though, is that I am trying to format my “events list by category” page without success. Regardless of what formatting I use in the Events Manager formatting manager, the category events page always displays as a regular WordPress posts page. For instance, I am unable to display an image or category description that I have uploaded to the category. I would appreciate any assistance with this.
“events list by category”
you can used shortcode [events_list category=”x”] where x is the event categories id; to show Event Categores ID, click Screen Options > click ID then click apply
also, to display Category Image you need to use #_CATEGORYIMAGE or #_CATEGORYNOTES at settings > formatting > event categories > Single category page format
which page are you trying to format, your single category page, or the list of categories (or other)? not sure which page you’re referring to specifically
I’m trying to create a single category page like the demo page:
My categories id’s are not displaying. The column is empty.
If I take the tag_id parameter from the URL (http://localhost/wp-admin/edit-tags.php?action=edit&taxonomy=event-categories&tag_ID=130&post_type=event) and I use that for the shortcode-[events_list category=”130″], where do I place the shortcode? Do I need to create a separate single category page for each category?
I am unable to display an image or category description that I have uploaded to the category.
have you tried Settings > Pages > Event Categories > Override with Formats ? or create a new php file within your theme directory then rename as taxonomy-events-categories.php and paste this snippet ->
<?php get_header(); ?> <div class="post-inner"> <?php global $post, $EM_Category, $wp_query; $EM_Cat = em_get_category($wp_query->queried_object->term_id); <h1><?php echo $EM_Cat->output('#_CATEGORYNAME'); ?></h1><br/> <p><?php echo $EM_Cat->output('#_CATEGORYNOTES'); ?></p><br/> <h3>Next Events</h3><br/> <div> <p><?php echo $EM_Cat->output('#_CATEGORYNEXTEVENTS'); ?></p> </div> </div> <?php get_sidebar(); ?> <?php get_footer(); ?>
Thanks for your help.
I tried the Settings > Pages > Event Categories > Override with Formats and it doesn’t seem to make any difference.
I created the taxonomy-events-categories.php and it returns all the events with #_CATEGORYNEXTEVENTS and also #_CATEGORYALLEVENTS. Neither #_CATEGORYNAME nor #_CATEGORYNOTES return any results.
I also noticed that when I add a new category in the manager it receives an id, but when I refresh the page, the id disappears.
Maybe all this has something to do with my theme? I’m using a child of Ascetica?
I see also that the events are entered as regular posts and the “single category” link returns a regular wp list of posts page. Maybe I should just create a custom post page for this, but I would like to know why the original isn’t working for me.
might be a theme or your other plugins are causing this; you can try the following steps to confirm:
Have you tried to temporarily:
– deactivating all other plugins to see if this resolves the problem. If this works, re-activate the plugins one by one until you find the problematic plugin(s).
– switching to the default theme to rule out any theme-specific problems
I deactivated all the other plugins and switched to the twenty ten theme and it looks like everything is working fine. So I guess now I have to find what plugin or theme was causing the problem.
Thanks for your help.
For anyone else who has had this problem, I discovered that the problem had to do with the theme. I asked the theme framework developer, Justin Tadlock, if it was something that could be resolved and he provided me with the following explanation and solution:
Based on what I’ve been able to gather from the two pages you linked and the code in the plugin, is that:
1) It’s filtering the wrong template hook (this will also break with any theme that has a taxonomy template).
2) It needs to filter the template with a higher priority.
So, in events-manager/classes/em-category-taxonomy.php, find these two lines of code:
Replace them with:
add_filter( ‘taxonomy_template’, array( ‘EM_Category_Taxonomy’, ‘template’ ), 99 );
I had the same issue. The fix above worked for me.
To get Tags to work I also had to make the same edit on em-tag-taxonomy.php
add_filter( ‘taxonomy_template’, array( ‘EM_Tag_Taxonomy’, ‘template’ ), 99 );
Hopefully this won’t break anything else!
It would be great if this fix could be included in a future release of the plug-in.
Justin is right that we reference the wrong template, but this is done on purpose and can be disabled on the settings page :
If you want to use your theme templates, then you need to disable ‘override with templates’ in Events > Settings > Pages > Event Categories/Tags, then we don’t interfere in those filters.
I couldn’t find ‘override with templates’ – but there is an option to ‘Override with Formats?’ which I tried disabling but it didn’t work.
Only avir673’s fix seems to work.
- The topic ‘formatting the show events by category page’ is closed to new replies.