Events Manager
[resolved] List events (6 posts)

  1. cgoncalves
    Posted 3 years ago #


    I've 2 questions:
    Question 1
    When i use the following code: <?php echo EM_Events::output(array('limit'=>4)); ?> I receive the next 4 events. But how could I get only the name of the event and get also the last 4 events. I mean, i except to get something like:
    1. Event name 1 (starts on 20/07/2013)
    2. Event name 2 (stars on 10/07/2013)
    3. Event name 3 (stars on 08/07/2013)
    4. Event name 4 (stars on 04/07/2013)

    PS: I don't want to show the date, but i want to get the last 4 events (that happens or will happen).

    Question 2
    Regardless to the question 1, i want to limit the output title no 30 letters, is it possible?



  2. Philip John
    Posted 3 years ago #


    I believe if you use the offset parameter you should be able to get past events.

    As for getting the name, you'd need to use the array argument to return an array of events which you can then loop through and print out yourself, adding your own HTML.

    For 30 letters, just use the trim() function.


  3. cgoncalves
    Posted 3 years ago #

    Hi Phil,

    Thanks for the tip and i almost did what i need.
    But the offset parameter, in documentation, i didn't see what can i use to get all the events instead of the next events.

    Do you know what can i use to solve that?


  4. agelonwl
    Posted 3 years ago #

    you can try something like <?php echo EM_Events::output(array('limit'=>4,'scope'=>'all')); ?>

  5. cgoncalves
    Posted 3 years ago #

    Hi agelonwl,

    It was exactly that =)


  6. angelo_nwl
    NetWebLogic Support
    Posted 3 years ago #

    glad it work!

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Events Manager
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic