Skip to:
Content
Pages
Categories
Search
Top
Bottom

[Resolved] Alphabetical pagination


  • ThatHostingCo
    Participant

    @shockpaw

    First off:
    1. Which version of WordPress are you running?
    a. Wordpress 4.0

    2. Did you install WordPress as a directory or subdomain install?
    a. Main directory

    3. If a directory install, is it in root or in a subdirectory?
    a. n/a

    4. Did you upgrade from a previous version of WordPress? If so, from which version?
    a. Yes, 3.8

    5. Was WordPress functioning properly before installing/upgrading BuddyPress (BP)? e.g. permalinks, creating a new post, commenting.
    a. No. Alphabetical pagination was only showing 20 members previously

    6. Which version of BP are you running?
    a. Version 2.0.2

    7. Did you upgraded from a previous version of BP? If so, from which version?
    a. No

    8. Do you have any plugins other than BuddyPress installed and activated? If so, which ones?
    a. Add New Default Avatar 1.3.1
    b. Backup 2.2
    c. BuddyPress 2.0.2
    d. BuddyPress Pending Activations 1.0.2
    e. BuddyPress Real Names 0.3.5
    f. Contact Form 7 3.9.3
    g. Custom Facebook Feed 2.1.1
    h. Email Address Encoder 1.0.4
    i. Google Analytics Dashboard for WP 4.3.3
    j. JotForm Feedback Button 1.0
    k. Newsletter 3.6.3
    l. Photo Gallery 1.1.30
    m. PHP Code for posts 1.2.0
    n. SYN Media WooCommerce USPS 2.1.0
    o. The Events Calendar 3.7
    p. The Events Calendar: WooCommerce Tickets 3.7
    q. The Events Calendar PRO 3.7
    r. WooCommerce 2.1.12
    s. WooCommerce Advanced Notifications 1.1.9
    t. WooCommerce Advanced Product Quantities 2.1.6
    u. WooCommerce Subscriptions 1.5.9
    v. WooCommerce Thumbnail Input Quantities 1.1.2
    w. WooThemes Helper 1.3.0
    x. WP-Members 2.9.6
    y. WPFront User Role Editor 1.2

    9. Are you using the standard BuddyPress themes or customized themes?
    a. Custom theme

    10. Have you modified the core files in any way?
    a. No, only member-loop

    11. Do you have any custom functions in bp-custom.php?
    a. No

    12. If running bbPress, which version? Or did your BuddyPress install come with a copy of bbPress built-in?
    a. N/A

    13. Please provide a list of any errors in your server’s log files.
    a. WordPress database error Unknown column ‘bprn_293’ in ‘having clause’ for query SELECT COUNT(u.ID) FROM vae_bp_xprofile_data u GROUP BY u.user_id HAVING bprn_293 IS NOT NULL AND bprn_1 IS NOT NULL made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/headway/index.php’), HeadwayDisplay::layout, HeadwayDisplay::grid, HeadwayLayoutRenderer->display, HeadwayGridRenderer->render_grid, HeadwayBlocks::display_block, do_action(‘headway_block_content_content’), call_user_func_array, HeadwayContentBlock->content, HeadwayContentBlockDisplay->display, HeadwayContentBlockDisplay->loop, HeadwayContentBlockDisplay->display_entry, HeadwayContentBlockDisplay->display_entry_content, the_content, apply_filters(‘the_content’), call_user_func_array, bp_replace_the_content, apply_filters(‘bp_replace_the_content’), call_user_func_array, BP_Members_Theme_Compat->directory_content, bp_buffer_template_part, bp_get_template_part, bp_locate_template, load_template, require(‘/themes/iherb/buddypress/members/index.php’), bp_get_template_part, bp_locate_template, load_template, require(‘/themes/iherb/buddypress/members/members-loop.php’), bp_has_members, BP_Core_Members_Template->__construct, bp_core_get_users, BP_User_Query->__construct, BP_User_Query->do_user_ids_query

    14. Which company provides your hosting?
    a. Our own – That Hosting Company (http://thathost.co)

    15. Is your server running Windows, or if Linux; Apache, nginx or something else?
    CentOS 5.8 (64 bits version) – Interworx Front End 5.0.14-580
    ———————

    The problem:
    We are using a custom members-loop. The pagination on the alphabetical list is limiting the members to the first 20 and not offering additional pages

    Troubleshooting:
    – We attempted to adjust the ajax search query, but it did not seem to make a difference.
    – We removed the custom buddypress member-loop and used the default. We found the same issue occurred.

    Notes:
    – We have 143 members
    – We are using a custom theme builder “Headway”
    – Pagination issue does not seem to be effecting “Latest”, “Random” or “Newest Registered” Options.
    – Site is live at http://www.iherb.org/members/

Viewing 7 replies - 1 through 7 (of 7 total)

  • shanebp
    Moderator

    @shanebp

    I see you are listing members in alphabetical order based on their last name.
    That is not standard behavior.
    How are you accomplishing that?


    shanebp
    Moderator

    @shanebp

    also – try deactivating the BuddyPress Real Names plugin and see if that solves the pagination issue.


    ThatHostingCo
    Participant

    @shockpaw

    There is an add-on called BuddyPress Real Names which allows you to sort in a certain manner. Client requests the alphabetical to be in last name sorting


    ThatHostingCo
    Participant

    @shockpaw

    ah.. gotcha. I deactivated it and it clears.. so the problem is actually with the plugin.


    ThatHostingCo
    Participant

    @shockpaw

    any suggestions for the reverse alphabetical sorting?


    shanebp
    Moderator

    @shanebp

    Add this to your theme/functions.php or plugins/bp-custom.php

    // members loop - sort by last word in Name if type==alphabetical
    function alphabetize_by_last_name( $bp_user_query ) {
        if ( 'alphabetical' == $bp_user_query->query_vars['type'] )
            $bp_user_query->uid_clauses['orderby'] = "ORDER BY substring_index(u.display_name, ' ', -1)";
    }
    add_action ( 'bp_pre_user_query', 'alphabetize_by_last_name' );

    ThatHostingCo
    Participant

    @shockpaw

    Thanks for that Shane. The best place for this is the bp-custom.php. I tried to put it in the functions.php and it threw up on me. That’s probably a Headway compatibility issue.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘[Resolved] Alphabetical pagination’ is closed to new replies.
Skip to toolbar