Posted: June 14, 2016 at 8:06 am
|
Hello I cannot get the pagination to work with the [ESPRESSO_EVENTS_TABLE_TEMPLATE]. I have tried [ESPRESSO_EVENTS_TABLE_TEMPLATE table_pages=5] and [ESPRESSO_EVENTS_TABLE_TEMPLATE table_paging=true table_pages=5] to no avail. Do you have any suggestions please? <?php echo do_shortcode(‘ [ESPRESSO_EVENTS_TABLE_TEMPLATE table_pages=5]’); ?> |
Hello, Is your goal is to show 5 events and then paginate additional events? If so, try this: [ESPRESSO_EVENTS_TABLE_TEMPLATE table_pages=5 limit=50] — |
|
|
Hi Lorenzo Thanks for the feedback. That does not seem to work it just limits the number of events displayed to 5 with no pagination. It is in the code now so you can see it https://www.sapphireqhse.co.uk/public_courses Would that solution you have provided also limit the number of pages? which is not a desired outcome (I would like to show all events just with pagination). Thanks |
|
Any ideas? |
Hello, I made an error on that shortcode, the values should be switched like this: [ESPRESSO_EVENTS_TABLE_TEMPLATE table_pages=5 limit=50] It will then show 5 at a time and then paginate up to 50 events in total. Feel free to adjust as needed. — |
|
|
Hi Lorenzo That did not work, it just made the page show all events. I have left the code as per your last message so the result can be seen at https://www.sapphireqhse.co.uk/public_courses ??? |
If you use Note – you should not need to set a limit value unless you want fewer events. |
|
|
Hi I have tried it without do_shortcode() and it still does not work 🙁 |
You placed So the problem is that [ESPRESSO_EVENTS_TABLE_TEMPLATE] shortcodes expects to run within the_content and is set up to enqueue it’s scripts during that call. As your running do_shortcode() within the templates its running later than expected and isn’t enqueuing the JS needed for the pagination. You can work around that by adding: if ( class_exists( 'EES_Espresso_Events_Table_Template' ) ) { add_action( 'wp_enqueue_scripts', array( EES_Espresso_Events_Table_Template::instance(), 'enqueue_scripts' ) ); } To the top of the archive template you are currently using, this must be placed before the call to get_header() or wp_head() depending on how your theme is set up. |
|
The support post ‘Pagination @ [ESPRESSO_EVENTS_TABLE_TEMPLATE]’ 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.