Support

Home Forums Event Espresso Premium Shortcode not working after EE3 to EE4 migrating

Shortcode not working after EE3 to EE4 migrating

Posted: February 6, 2017 at 11:40 pm

Viewing 11 reply threads


bku

February 6, 2017 at 11:40 pm

In EE3 I have used

[EVENT_LIST limit=1 show_expired=true order_by=date(start_date) sort=DESC]
so i get 1 event, even if it is expired, and ordered by start date descending

now i need to write it like this:
[ESPRESSO_EVENTS limit=1 show_expired=true order_by=date(start_date) sort=DESC]

I get only the expired with pagination but the limit is ignored. what can be done to fix that?


Garth

  • Support Staff

February 7, 2017 at 11:17 am

Does this work?

[ESPRESSO_EVENTS limit=1 show_expired=true order_by=start_date sort=DESC]


bku

February 7, 2017 at 10:37 pm

same thing. i get 1 event but still get paging for all the rest


Tony

  • Support Staff

February 8, 2017 at 4:42 am

Hi there,

Limit is not being ignored if you are getting a single event with pagination for the rest of your events, that’s expected behavior when using limit on the ESPRESSO_EVENTS event list shortcode.

So you only want to display a single event (event if expired) with no pagination?


bku

February 8, 2017 at 6:15 am

Yes, exactly

now beside that, i need to change the design to be the same as i had with the EE3 lite

what is the best practice for that so with next updates it won’t delete the design?


Tony

  • Support Staff

February 8, 2017 at 6:54 am

I can’t see an option that will allow for that, but I’ll check in with the developers to see if I’m missing something.

EE3 and EE4 use completely different methods to output the details, EE3 had its own set of templates it loaded for the output, EE4 uses your sites theme and injuects the details into the_content, so getting EE4 to display in the same way as EE3 is not simple.

What is it you want to change?


bku

February 8, 2017 at 6:59 am

I’m waiting for your respond, my boss and client is on my neck for solution.

the website
http://bku.technion.ac.il/
shows the EE3 lite
the development server
http://198.20.116.197/~bkutechnionac/
shows the EE4


Josh

  • Support Staff

February 8, 2017 at 8:09 am

Hi there,

what is the best practice for that so with next updates it won’t delete the design?

The best practice is you put the design into your WordPress theme. You’ll see some example templates in the EE4 core plugin in the /public folder. Here are some links to documentation that has more information about how to get started with theming for Event Espresso 4:

https://eventespresso.com/wiki/ee4-custom-post-types/#single_event_template
https://eventespresso.com/wiki/ee4-themes-templates/


bku

February 11, 2017 at 9:51 pm

Hi, What with a solution for our problem with shortcode?
if it is only possible in EE3 we might want to go back to the EE3 version


Tony

  • Support Staff

February 13, 2017 at 8:37 am

One option is to hide the pagination using CSS, to hide that specific section you can use:

.home .post-207 + .ee-pagination-dv {
    display: none;
}

ANother option is to not use the ESPRESSO_EVENTS shortcode for that output and query for the events yourself, generating your own output which doesn’t use the above shortcode. Here is an example of doing just that:

https://gist.github.com/joshfeck/6e33532c37a123bbf532

However you’ll need to alter the where conditions to suit your use case.


bku

February 19, 2017 at 11:42 pm

I have tried to use the git code you supplied.
i managed to extract the name, description and url for the event.
i need the start date, address and several more fields.
how to get them?


Josh

  • Support Staff

February 20, 2017 at 9:54 am

Hi there,

I answered your question in your other topic:

https://eventespresso.com/topic/simple-ee4-event-list-query-and-display/#post-232905

Viewing 11 reply threads

The support post ‘Shortcode not working after EE3 to EE4 migrating’ 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