Support » Plugin: Events Manager » [Plugin: Events Manager] Pagination on template files

  • Anyone else having issue with pagination on template files? Specifically category-single.php

    The pagination shows on the bottom of my event list but when clicking on page 2,3,etc the link always re-loads page 1 and never goes on.

    <?php
    echo EM_Events::output( array(
    	'limit'=>20,
    	'scope'=>'future',
    	'category'=>$currentid,
    	'pagination'=>'1',
    	));
    ?>

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

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Marcus

    (@netweblogic)

    NetWebLogic Support

    are you using this on another page? I ask because the code you pasted there looks like you’re making your own customization, might have a different effect.

    No just using it on category-single.php And if i take out everything else on the template page and just use

    <?php
    echo EM_Events::output( array(
    	'limit'=>20,
    	'scope'=>'future',
    	'category'=>1,
    	'pagination'=>1,
    	));
    ?>

    The pagination still doesn’t work. It DOES work everywhere else in EM world on my site, just not on category-single. Confusing.

    Plugin Author Marcus

    (@netweblogic)

    NetWebLogic Support

    not sure why, would look into this in the coming weeks once v5 is out but maybe if you copy some of the code from events-list.php it should work. it might be that it’s limited to shortcodes.

    Ever solved this problem?
    I’m getting it too. Page 2, 3, 4 all go to page 1.
    And I’m using events-list.php

    So instead of using

    echo EM_Events::output(array(
    'format'=>'<B>#_EVENTLINK</B><br/> and all my custom php stuff here',
    'limit'=>20,
    'pagination'=>1));

    I’m now using

    $args['format'] = "<B>#_EVENTLINK</B><br/> and all my custom php stuff here";
    $args['limit'] = 20;
    // NO PAGINATION ARGS - USE THE DEFAULT BECAUSE THE DEFAULT WORKS
    echo EM_Events::output( $args );

    and YAY pagination is working.

    FIXED! (for me anyway)

    Plugin Author Marcus

    (@netweblogic)

    NetWebLogic Support

    interesting… does this work for you rontarson?

    Sorry, just saw this post. Using debsch’s solution above does NOT solve the pagination error I’m having on a custom format page, in my case single_location_format.php

    Without defining $args['pagination'] = true; the pagination wont show at all.

    The below will show pagination but the linking still is not functioning.

    $args['format'] = "<B>#_EVENTLINK</B><br/>";
    $args['limit'] = 5;
    $args['pagination'] = true;
    echo EM_Events::output( $args );

    debsch’s solution may work on templates but does not seem to solve it on custom format pages

    Plugin Author Marcus

    (@netweblogic)

    NetWebLogic Support

    I think this should work now, check out the dev version

    @Marcus- I have always used the full production versions of EM. Is there a link to the dev versions somewhere? Sorry if I’m just missing it.

    Plugin Author Marcus

    (@netweblogic)

    NetWebLogic Support

    I’m testing this out, and I can’t reproduce this on the latest dev version.

    I paste both of debsch codes e.g. into the page.php file of the BP default theme, and it works perfectly fine (even both on the same page), pagination and all.

    not sure what else to say…. if you’re hooking into EM with filters, one thing you’ll have to do is just output the array of $args down the line of functions to see where pagination gets unset.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘[Plugin: Events Manager] Pagination on template files’ is closed to new replies.