Support

Home Forums Event Espresso Premium Categories Shortcode Duplacting only one category.

Categories Shortcode Duplacting only one category.

Posted: June 7, 2016 at 7:54 am


MattSpectruss

June 7, 2016 at 7:54 am

Hi there,

Inside my wordpress theme I am unable to post multiple categories. First I tried through the WYSIWG editor and out each shortcode in, the result would be only one category out of the three would be shown and would be duplicated where the other two shortcodes were.

I then put it directly into my themes file using the do_shortcode function, but that produced the same result.

I need to get individual categories working so I can display what I need.

Thank you,
Matt


Garth

  • Support Staff

June 7, 2016 at 1:07 pm

Hi matt,

What do you mean you are unable to post multiple categories? What are you using to display your categories? Are these Event Espresso categories or WordPress categories?

Also, your image is not displaying above.


MattSpectruss

June 7, 2016 at 1:33 pm

So what I am doing is:

1. I have Event Espresso categories called:
– Registration
– Registration-one-day
– Registration-two-days

2. I am presently using:
<?php echo do_shortcode(‘[ESPRESSO_EVENTS category_slug=registration]’); ?>

<?php echo do_shortcode(‘[ESPRESSO_EVENTS category_slug=registration-two-days]’); ?>

<?php echo do_shortcode(‘[ESPRESSO_EVENTS category_slug=registration-one-day]’); ?>

respectively to display these events.

3. The issue is that it only ever displays the event category whose shortcode is presented first in the HMTL hierarchy.

So in this example, the first one listed is the “registration” event espresso category. So on all three areas that I call the shortcode, it displays the exact same information across each one – the events categorized as “Registration”.


Josh

  • Support Staff

June 7, 2016 at 3:35 pm

Those ESPRESSO_EVENTS shortcodes will generally not work if you try to use them with the do_shortcode function. Have you tried adding them directly to a page’s content?


MattSpectruss

June 8, 2016 at 7:38 am

Originally I had used it directly in the WordPress WYSIWYG editor and still got the same result.


Josh

  • Support Staff

June 8, 2016 at 8:27 am

You’ll need to be sure to input the shortcodes using the text editor.


MattSpectruss

June 8, 2016 at 8:36 am

Right, I have used the text editor side as well to use the different shortcodes. The result is still the same thing, it just repeats whatever the top shortcode is across each section.


MattSpectruss

June 8, 2016 at 9:56 am

I am really confused about why the shortcode keeps duplicating. If I need to setup a user account for you to take a look and see if there is something I am doing wrong I am happy to do so.

But I need to get this solved as soon as possible.


Josh

  • Support Staff

June 8, 2016 at 1:06 pm

Hi Matt,

Does the list of events display correctly if you temporarily switch to another WordPress theme?


MattSpectruss

June 8, 2016 at 1:13 pm

No sir, I switched to the twenty sixteen theme and get the same result.


Josh

  • Support Staff

June 8, 2016 at 3:38 pm

Hi Matt,

You can solve this as soon as possible by opening up shortcodes/espresso_events/EES_Espresso_Events.shortcode.php and around line 88 where it has this line of code:

$attributes = array_merge( (array)$attributes, (array)$this->_attributes );

You remove that code. Somewhere along the way, this change will make it into an update.


MattSpectruss

June 14, 2016 at 9:48 am

Hey there Josh, that seemed to do the trick it is showing the correct categories now. Thank you for your assistance on this issue!


Josh

  • Support Staff

June 15, 2016 at 6:04 pm

The next update to Event Espresso4 (4.9.1) will include a similar fix.

The support post ‘Categories Shortcode Duplacting only one category.’ 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.

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3

Documentation for Event Espresso 4

Status: closed

Updated by  Josh 3 years, 4 months ago ago

Topic Tags

Notifications

This topic is: resolved
Do NOT follow this link or you will be banned from the site!