WordPress.org

Ready to get started?Download WordPress

Forums

Events Manager
[resolved] How to customise Events List page? (12 posts)

  1. debsch
    Member
    Posted 2 years ago #

    I'm using latest version of wordpress & events-manager and twenty-ten theme.

    I have copied events-manager/templates/templates/events-list.php to my theme folder and adjusted settings in events-manager (events-manager-options#pages > Override with Formats? > NO) so that it reads events-list.php for formatting.

    I know it is reading events-list.php because if I add "TEST" to the top of the file it displays at the top of the events list page.

    BUT I am stuck because I do not know how to "format" this single line on events-list.php which seems to display the list of events...
    EM_Events::output($args);

    I have successfully edited the template for a SINGLE event page by editing loop-single.php in my theme folder but, after hours of searching and reading, I am stuck as to how to edit events-list.php to customise my events list page.

    http://wp-events-plugin.com/documentation/advanced-usage/ and
    http://wp-events-plugin.com/documentation/using-template-files/ does not help.

    Can someone please point me in the right direction?

    Thank you.

    (Please note - I do not want to change the output of EM_Events::output($args) - I want to format or add html code around each event in the list that is produced by EM_Events::output($args))

    http://wordpress.org/extend/plugins/events-manager/

  2. debsch
    Member
    Posted 2 years ago #

    So I figured it out myself. Don't know if this is the correct/best way to do it but it works for me. NOTE: EVENTS MANAGER PLUGIN PEOPLE... it would be great if you could add this 'how to' to your documentation to help out other noobs who might be struggling like me - or if it IS there already, make it more obvious because I couldn't find it. (But other than this issue I must say I am VERY HAPPY with your events plugin! Thank you.)

    I copied the events-list.php from the plugin directory to my theme:
    wp-content/themes/twentyten/plugins/events-manager/templates/events-list.php

    and then I changed this line:
    echo EM_Events::output( $args );

    to:

    echo EM_Events::output(array('format'=>
    '<a href="#_EVENTURL" border=0>$mycustomphpstuffiwantedherethatdoesntshowifiuseformats</a>
    <B>#_EVENTLINK</B><br/>#_EVENTDATES #_EVENTTIMES<BR/><i>#_LOCATIONNAME, #_LOCATIONADDRESS, #_LOCATIONTOWN </i><br/><a href="#_EVENTURL">Details & map</a><HR>',
     'limit'=>20, 'pagination'=>1));

    :)

  3. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 2 years ago #

    we'll be making more tutorials in the near future, once we get through some of the major feature upgrades over the coming months.

  4. sohum
    Member
    Posted 2 years ago #

    Thank you so much for your code Debsch! This saved me a lot of time and headaches.

    One question though, it works like a charm, the only thing I can't get to work is the #_EVENTIMAGE or #_EVENTIMAGE{x,y} placeholders. I've tried both without luck.

    These show without a problem on the single event posts, but not elsewhere such as the homepage. Any idea how to get them working?

  5. sohum
    Member
    Posted 2 years ago #

    Just to update my message = I discovered that images uploaded through the Events Manager default "Submit an Event" page showed. If added through the WP-admin using the upload media link, it does not show.

    Now to find out why #_EVENTEXCERPT shows ALL of the #_EVENTNOTES instead of just 40 or so words... :)

    Thank again Debsch!

  6. Marcus
    NetWebLogic Support
    Plugin Author

    Posted 2 years ago #

    sohum pls don't double post.

  7. chris
    Member
    Posted 2 years ago #

    @sohum, are you using the Read More link in the WP WYSIWYG to create the break for the excerpt?

  8. sohum
    Member
    Posted 2 years ago #

    Hi Chris, I wasn't.

    The site will allow for readers to submit events and the WYSIWYG is disabled for this reason.

    I also didn't want to rely on reader to include the break at the appropriate point. Could foresee readers wanting their event to standout, for example, and them not adding a break which would affect the site layout.

    My solution was to add a limited height to the div displaying the events, and then use css to control the overflow. Nasty hack...

  9. MichelleLeslie
    Member
    Posted 2 years ago #

    Thank you! This helped me out a lot.

  10. mukesh panchal
    Member
    Posted 2 years ago #

    MichelleLeslie

    what help u?

  11. retajos
    Member
    Posted 1 year ago #

    Great code, Debsch, thanks a lot!!

  12. debsch
    Member
    Posted 1 year ago #

    THANK YOU WORDPRESS and thank you ME!
    12 months later and I had completely forgotten how/where to edit the events list page. So thanks for the reminder!
    :)

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic