Support

Home Forums Event Espresso Premium Display category name on Recurring Events Table

Display category name on Recurring Events Table

Posted: January 28, 2014 at 5:48 am


Marion Le Flohic

January 28, 2014 at 5:48 am

Hi,

I would like to display the category name of the event on the Recurring Events Table.
I’m currently working on the index.php of this addon but my code doesn’t work:

echo stripslashes_deep($first_event_instance[‘category_name’]);

I also would like to exclude some category to display.

Can you help me please?

Regards,

Marion.


Dean

January 28, 2014 at 6:40 am

Hi Marion,

We would be glad to help, but first can you just clarify: is this the Recurring Dropdown template that is part of the Custom Templates Add on or is it the older recurring events template file found in the recurring events plugin?

They are similar in name but quite different in code 🙂


Marion Le Flohic

January 28, 2014 at 6:49 am

Hi Dean!

This one: https://eventespresso.com/product/recurring-events-drop-down/


Josh

  • Support Staff

January 28, 2014 at 1:00 pm

Hi Marion,

The likely reason your code doesn’t work is because “category_name” isn’t defined in the array. Instead, you could use the category name shortcode like this:

<?php echo do_shortcode('[CATEGORY_NAME event_id="'.$first_event_instance['event_id'].'"]')?>


Marion Le Flohic

January 28, 2014 at 3:09 pm

Hi Josh,

Indeed I declared category_name in the array:
‘category_name’ => stripslashes_deep($event->category_name),

I also tried with the shortcode you gave me, but it doesn’t work.

Any suggestion?


Josh

  • Support Staff

January 28, 2014 at 4:00 pm

‘category_name’ => stripslashes_deep($event->category_name) will not work because category_name isn’t in the event details database table.

Using the shortcode worked for me, so I don’t have any additional suggestions. Maybe if you post your modified code into a pastebin and post a link to it here one of us can take a look.

The support post ‘Display category name on Recurring Events Table’ 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