Support

Home Forums Event Espresso Premium Espresso_Events Shortcode – Set Start Higher than 1?

Espresso_Events Shortcode – Set Start Higher than 1?

Posted: June 19, 2018 at 3:53 am


PlasmicSteve

June 19, 2018 at 3:53 am

On my home page I currently have a “Next Event” section at the top of mthe page with [ESPRESSO_EVENTS limit=1] (we get more conversions from regular visitors, especially mobile, when there’s an image/workshop at the top)

Then some introductory/welcome text (for new visitors as well as for SEO purposes)

…and then I the next 10 workshops: [ESPRESSO_EVENTS limit=10] (to promote additional workshops)

Of course, the first event in that list of 10 is a repeat of the one at the top of the page.

Making things more complex, we sometimes have multiple events in a day, so setting by date would result in multiple events at the top, which would push the intro text down undesirably low on the page.

Is there any way to avoid this and just have the next single event at the the top, and then events 2 through 10 after that?


Josh

  • Support Staff

June 20, 2018 at 8:40 am

Hi Plasmicsteve,

There is a way and it involves adding some PHP code to the site and then adding a shortcode to the page. First, the PHP code:

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

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

Then you edit your page content so it follows this example:

<div id="intro-text-for-events">
Your intro text goes here.
</div>
[ESPRESSO_EVENTS limit=11 show_title=false]
[move_intro_text]


PlasmicSteve

June 21, 2018 at 2:19 am

I’ll give it a shot. Thanks, Josh!

The support post ‘Espresso_Events Shortcode – Set Start Higher than 1?’ 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