WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] formatting the show events by category page (15 posts)

  1. avir673
    Member
    Posted 1 year ago #

    Hi
    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.
    Thanks,

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

  2. agelonwl
    Member
    Posted 1 year ago #

    Hi,

    "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

    http://wp-events-plugin.com/documentation/shortcodes/
    http://wp-events-plugin.com/documentation/placeholders/

  3. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 1 year ago #

    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

  4. avir673
    Member
    Posted 1 year ago #

    I'm trying to create a single category page like the demo page:
    http://demo.wp-events-plugin.com/events/categories/rhythm-blues/

    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?

  5. agelonwl
    Member
    Posted 1 year ago #

    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(); ?>
  6. avir673
    Member
    Posted 1 year ago #

    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.

  7. agelonwl
    Member
    Posted 1 year ago #

    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

  8. avir673
    Member
    Posted 1 year ago #

    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.

  9. avir673
    Member
    Posted 1 year ago #

    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:
    add_filter('archive_template',array('EM_Category_Taxonomy','template'));
    add_filter('category_template',array('EM_Category_Taxonomy','template'));
    Replace them with:
    add_filter( 'taxonomy_template', array( 'EM_Category_Taxonomy', 'template' ), 99 );

  10. agelonwl
    Member
    Posted 1 year ago #

    thanks for updating and sharing the solution.

  11. Plan9
    Member
    Posted 9 months ago #

    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

    with:

    add_filter( 'taxonomy_template', array( 'EM_Tag_Taxonomy', 'template' ), 99 );

    Hopefully this won't break anything else!

  12. Plan9
    Member
    Posted 9 months ago #

    It would be great if this fix could be included in a future release of the plug-in.

  13. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 9 months ago #

    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.

  14. Plan9
    Member
    Posted 9 months ago #

    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.

  15. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 9 months ago #

    oops, yes it's 'override with formats'

    I'll check @avir673's suggestion, looking at it now, it may even be a better alternative to what we h ave now anyway.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic