WordPress.org

Ready to get started?Download WordPress

Forums

BuddyPress Custom Posts
Paging issue (3 posts)

  1. Micah Wood
    Member
    Posted 3 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;
    query_posts($query);

    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!

    http://wordpress.org/extend/plugins/buddypress-custom-posts/

  2. kunalb
    Member
    Plugin Author

    Posted 3 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
    Member
    Posted 3 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic