Support

Home Forums Event Espresso Premium Event Shortcode works sometimes and not others

Event Shortcode works sometimes and not others

Posted: January 11, 2017 at 3:06 am

Viewing 6 reply threads


mrmatthewsg

January 11, 2017 at 3:06 am

I can’t figure out why the event shortcode will work sometimes and not others on my site. Have the latest wordpress (4.7) and event espresso (4.9.25.p) installed. I’ve searched the forums and elsewhere and can’t find a solution. The ticket selector embed code works consistently but I would prefer to use the shortcode since I want to hide everything but the “Register Now” button so people can just click the button to register.
Here’s a test page showing the embed code, event shortcode as well as the events list shortcode all working correctly: Test Page

Here’s the other page showing the embed code working but not the shortcode: Registration Page

Any help is appreciated as I’ve been searching for hours trying to figure out a solution.


Josh

  • Support Staff

January 11, 2017 at 9:51 am

Hi there,

It looks like you’re trying to add the Ticket Selector short code to a text widget. In most cases, those shortcodes need to be added to the main content section of the page instead of into a widget area.


mrmatthewsg

January 11, 2017 at 10:26 am

It’s a Page Builder plugin used on the pages. I just changed the test page to the page builder format. It still works on that page and not the other. It was working on the registration page earlier and then when I made changes to the text it all of a sudden stopped working. Is there another possible issue?


Josh

  • Support Staff

January 11, 2017 at 11:01 am

No it’s the same issue. So what happens is there’s a post short code tracker and it will track changes to the main content section of the page and when it detects an Event Espresso short code, the short code will parse correctly. If you go back later and place the short code anywhere else, like in a Page builder editor, a text widget, or any other field that’s not the main content section, the short code might work for awhile (because it was initially tracked to that main content section). Later though it can lose that tracking and it won’t parse anymore. So the way forward is you place the short code within the page’s main content section.


mrmatthewsg

January 11, 2017 at 11:25 am

Ok, well I don’t know that I want to remove the page builder from the page so I guess I’ll have to use the embed code. In that case, how do I change the css for that. I tried all sorts of things to access the different divs and classes and tried “!important” but it doesn’t seem to affect it at all.


Josh

  • Support Staff

January 11, 2017 at 12:32 pm

The embed code loads in an iframe, and iframes use their own CSS. So any CSS you add to the page will not affect the styles within the iframe. You can load in more custom styles by using a filter hook. Here’s an example in a gist:

https://gist.github.com/joshfeck/bdd2e1d8d0815fdc7ba30c8933f54fb8

You can add the above to a functions plugin or into your WordPress theme’s functions.php file.


mrmatthewsg

January 12, 2017 at 12:11 am

Thanks that worked. Super appreciate it!

Viewing 6 reply threads

The support post ‘Event Shortcode works sometimes and not others’ 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