BuddyPress Custom Posts
Paging issue (3 posts)

  1. Micah Wood
    Posted 4 years ago #

    Hi, I am using your EventPress plugin with BuddyPress (all the latest versions). I added a type/index.php file to my theme in order to overwrite the default events directory page. (Let me know if there is a better way of doing this).

    My issue is that I am using query_posts() to overwrite the query and encountered a paging issue. Here is my code:

    $query = $wp_query->query_vars;
    $query['nopaging'] = 0;
    if( !$query['paged'] ) $query['paged'] = 1;

    I am using next_posts_link() and get a 404 regardless of permalink structure. Actually, I am being redirected to the homepage, but I assume it is because it cannot find the paged events page.

    Any help would be appreciated... and thanks for the EventPress plugin. Great work!


  2. kunalb
    Plugin Author

    Posted 4 years ago #

    Well, I'm afraid there's no easy way to allow for pagination right now. How BPCP displays events is by completely sidestepping the default blog post display which BuddyPress inherits from WordPress -- this allowed me to get URLs like events/<event-name>/, events/<event-name>/edit, etc without worrying too much about wordpress detecting and overriding buddypress as well as being able to directly use various buddypress functions for adding sub-menus, etc.

    I've added this as a feature to be added in BPCP 0.1.3. I'll basically have to over-ride the next_posts_link function using a filter and add support for pagination in the query that is generated.

    (BPCP 0.1.3 should be out by 20th October or so)

  3. Micah Wood
    Posted 4 years ago #

    Awesome! I'll keep an eye out for it.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • BuddyPress Custom Posts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic