• Resolved nwarmenh

    (@nwarmenh)


    I’m trying to make a custom events list whose content includes material generated by WP template tags, *and* has pagination.

    I’ve ben able to incorporate template tags using this method (EM_Events::get()), but even with the pagination flag set in the query, I don’t get any pagination tool. Pastebin code here.

    Alternatively, I’ve been able to use the event-list.php template to do the formatting *and* get the pagination to work, but I can’t figure out how to include my WP template tags in there. When I use this code, I get an error of “current() expects parameter 1 to be array, string given in [path]/classes/em-events.php on line 171”.

    I think I’m pretty close to the solution, but it still eludes me! Big help so far from threads like this and the other one linked above… I just am missing something.

    Marvelous plugin, for sure. Help?

    https://www.ads-software.com/plugins/events-manager/

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support angelo_nwl

    (@angelo_nwl)

    hi,

    sorry but did you mean using wordpress template with the event listing page? also, can I know the actual code you are using for us to see?

    Thread Starter nwarmenh

    (@nwarmenh)

    My code is in those linked pastebins:
    1. https://pastebin.com/HxMHQm5H
    2. https://pastebin.com/PsRBc1wr

    The first of my examples puts the EM code into a WP page template. (Live page here.)

    The second of my examples uses the events-list.php EM template, but I can’t figure out how to call WP template functions that are usually called in the loop.

    Thread Starter nwarmenh

    (@nwarmenh)

    Oops, forgot to link the live page example! Here. (But looking at the PHP is presumably more useful.)

    Thread Starter nwarmenh

    (@nwarmenh)

    Any thoughts on this? What PHP function might I use to generate pagination links on a custom call to EM_Events::get?

    Because this deals with custom coding we’re not able to help too much, the best thing I can suggest is to take a look at em-events.php to see how pagination is handled in the original function.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘WP template tags in EM templates; formatting output’ is closed to new replies.