Support

Home Forums Event Espresso Premium Disable pagination from ESPRESSO_EVENTS shortcode

Disable pagination from ESPRESSO_EVENTS shortcode

Posted: June 4, 2018 at 11:21 am


duarte

June 4, 2018 at 11:21 am

Hi, I’m using the

[ESPRESSO_EVENTS limit=3]

shortcode to display 3 highlighted events on a page. But I want to show these 3 only.
So how can I disable the pagination for the shortcode?

I can’t do it via CSS because the theme’s pagination in that page is actually changing the page for the shortcode as well, which is what I’m trying to avoid.

Please advise!
Many thanks


Josh

  • Support Staff

June 4, 2018 at 11:47 am

Hi,

You could use the following CSS to hide only the pagination from the ESPRESSO_EVENTS shortcode:

.ee-pagination-dv {
display: none;
}

or hide only the pagination from the ESPRESSO_EVENTS shortcode, on that page only:

.page-id-1234 .ee-pagination-dv {
display: none;
}

(swap in your page ID to replace 1234)


duarte

June 5, 2018 at 7:23 am

Hi, thanks for the answer but maybe you didn’t read the OP to the end.
I can’t use CSS to hide it because another pagination I have on that page, just for a normal listing of posts, is interfering with the [ESPRESSO_EVENTS limit=3] shortcode. So when I change page on my regular posts listing, the EE shortcode also changes page and shows 3 different events. Which is what I’m trying to avoid.

So I need to display the 3 events with the pagination completely disabled, not just hidden!


Josh

  • Support Staff

June 5, 2018 at 8:51 am

I read the OP until the end, but it wasn’t exactly clear what the issue was. Thank you for taking the time to explain further.

It may or may not help to remove the pagination from the shortcode because normally the page’s pagination shouldn’t interfere, but you can give this a try:

if ( ! function_exists( 'espresso_pagination' ) ) {
    function espresso_pagination() {
        return;
    }
}

You can add the above to a functions plugin.


duarte

June 6, 2018 at 10:44 am

Hi,
Ended up not working but just so you know, I tried adding your widget to the page and apparently it does what I was looking for, with no interference from the rest of the page.
Thanks again

The support post ‘Disable pagination from ESPRESSO_EVENTS shortcode’ 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  duarte 2 weeks, 3 days ago ago

Topic Tags

Notifications

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