• Resolved onirisweb

    (@onirisweb)


    Hi,

    I am trying to display the category name (event or location) in my result page when I make one request. You can check this address : http://francejazz.fr/?s=guy+bonne

    In the result section, you can see under the green title a clear gray area where it is displayed for example “dans Articles : France Jazz”.

    If you scroll down the 5th and 6th posts (GUY BONNE QUINTET) don’t display anything in the same area. These post are in fact events.

    So is there an hack to display the category name according to the condition that it is an event ?

    I tried this :

    <?php if ( $post->ID == $events_page_id ) : ?>

    <?php echo EM_Events::category ; ?>

    <?php endif; ?>

    But of course it doesn’t work.

    Thanks for your help.

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

Viewing 3 replies - 1 through 3 (of 3 total)
  • Is this using wp search post? have you tried creating a single-event.php template in your theme (i.e. like the theme single.php file) and modify as needed. Also, please see the docs at http://wp-events-plugin.com/documentation and templates files at /templates

    Thread Starter onirisweb

    (@onirisweb)

    No unfortunately, because the theme is mystic, that uses a particular loop.

    Here is the code that displays the category name in the gray area :

    <?php if(atom()->options('post_category') && atom()->post->getTerms('category')): ?> 
    
            <?php atom()->te('in %s', atom()->post->getTerms('category', ', ')); ?>
            <?php endif; ?>

    I would like to use condition like “if is_event” or something similar, but I don’t know how to program it.

    please see this link – http://wp-events-plugin.com/updating-to-v5/ (see the EM_Category and EM_Categories section)

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘[Plugin: Events Manager] Display the category attached to event’ is closed to new replies.