Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 6 replies - 1 through 6 (of 6 total)
  • Profile photo of John Hart
    John Hart
    Participant

    @struth

    Ow thanks for your quick help,

    activating Twentyfourteen correctly shows all the members with the default pagination. Why didn’t I think of doing that, I feel a bit stupid now lol

    I have not made any changes to the members-loop.php file that I can remember but I’m checking it out just incase, I’ll post back about this one

    Hmm, not sure what to fix? I’ll do some testing.

    I might just start using Twentyfourteen lol

    And thanks again

    Profile photo of John Hart
    John Hart
    Participant

    @struth

    I will simplify the question & add some screen shots in the hope of better explaining my issue

    Members list’s only showing pagination for two members in each page?

    site showing only two members

    site showing only two messages

    I’m unsure how this happened only up until a few days ago the members directory showed 20 members, I thought it might be the latest update though I now doubt it. Is anyone having the same issue?

    Can someone please point me to where I might find the file and code to change this behaviour from 2 members back to 20?

    Profile photo of John Hart
    John Hart
    Participant

    @struth

    Hi abray,

    including div#content in the css class did not work in my theme however…
    Try the below code, it works for me without upsetting widgets

    #members-dir-list.members.dir-list li {
        display:inline-block;
        width:28%;
        margin:6px;
    }

    - JH

    Profile photo of John Hart
    John Hart
    Participant

    @struth

    I was quietly hoping you would figure this out, well done Lars.

    Will test it out in adminbarbegone tomorrow, looks good, Thanks for being open with you code and posting, this will help me alot. I couldn’t get this code to redirect not logged in users to the registration page but then, I’m a n00b with php; lol

    s2Members uses ! a lot in short code
    [s2If !is_user_logged_in()]if user is not logged in show this [/s2If]

    @paintermommy might find s2Members quite useful at soulwomansanctuary but it looks like she has sorted it out

    Next I need to work on an admin page to switch functions on and off, should be fun but I keep getting side tracked with responsibilities.

    Profile photo of John Hart
    John Hart
    Participant

    @struth

    I just hijacked Mr Jacoby code:

    add_action('after_setup_theme', 'remove_admin_bar');     // remove admin bar for users
    
    function remove_admin_bar() {
    if (!current_user_can('administrator') && !is_admin()) {
      show_admin_bar(false);
    }
    }
    
     function redirect2profile(){
    	include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
    	if($_SERVER['REQUEST_URI'] == '/profile/' && is_plugin_active('buddypress/bp-loader.php') && is_user_logged_in()){     //show buddypress user profile page
    		global $current_user;
    		wp_redirect( get_bloginfo('url') . '/members/'. $current_user->user_login . '/profile/'); 
    		exit();
    	}
     }
    add_action('init', 'redirect2profile');
    
    ?>

    Into a plugin for those who don’t know how, or just don’t want to add this code to the functions.php file. you can download it HERE

    Removes the admin bar for all users except Administrators and gets “global $current_user;” profile to a page you create called Profile as described by jackreichert

    I’ve said it before but I’m going to say it again – you’re a genius Mr Jacoby

    Profile photo of John Hart
    John Hart
    Participant

    @struth

    @jackreichert your a bloody genius Mr Jacoby, buddyPress just gets better & then some, thanks you mate!

    Do you mind if I include your code in my “n00bish” wp plugin:

    function redirect2profile(){
    include_once( ABSPATH . ‘wp-admin/includes/plugin.php’ );
    if($_SERVER[‘REQUEST_URI’] == ‘/profile/’ && is_plugin_active(‘buddypress/bp-loader.php’) && is_user_logged_in()){
    global $current_user;
    wp_redirect( get_bloginfo(‘url’) . ‘/members/’. $current_user->user_login . ‘/profile/’);
    exit();
    }
    }
    add_action(‘init’, ‘redirect2profile’);

    I’m just beginning my journey into php & I’ve always wanted to write a toolbox for wp and buddy, you gotta start somewhere : )

    PS:Do I credit you in the plugin as a contributor?

    Best Regards
    John Hart

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