Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-sales domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the better-click-to-tweet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-amazon domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-stats domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Add Category Identifier to Template Tags? | Event Espresso - Staging Server

Support

Home Forums Event Espresso Premium Add Category Identifier to Template Tags?

Add Category Identifier to Template Tags?

Posted: September 26, 2013 at 6:04 pm

Viewing 2 reply threads


Sarah Rogers

September 26, 2013 at 6:04 pm

Hello,

I want to output the category identifier a tag in my registration_list_display.php file so that I can modify my css based on the category. I’m able to output the category id using

<div id="event_espresso_registration_form" class="cat<?php echo $event->category_id; ?> which returns the correct category array – however, since it returns something like 1,9, I cannot alter it using css. Is there a way to use the category identifier or name?

Thanks,
Kindra


Dean

  • Support Staff

September 27, 2013 at 3:00 am

Hi,

You can use this shortcode – http://staging.eventespresso.com/wiki/shortcodes-template-variables/#event-category

In the template file you would add it like this:

<?php echo do_shortcode("[CATEGORY_NAME event_id=" . $event->id . "]"); ?>


Sarah Rogers

September 27, 2013 at 8:42 am

THANK YOU! I was pulling my hair out on that one!

Viewing 2 reply threads

The support post ‘Add Category Identifier to Template Tags?’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso - Staging Server