Create and use a new Members directory template

Home Forums BP Profile Search Forum Create and use a new Members directory template

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #10326 Reply
    Michael Spencer
    Guest

    I cannot get a Profile Search Form to use any thing other than the default members index and member loop files.

    I have switched to Twenty Nineteen theme to remove any complications with my theme as I could not get it to work but it is just the same problem.

    I am using the shortcode =
    [bps_directory template=’members/index-2, members/members-loop-2′]
    and have copied files into twentynineteen/buddypress/members directory (and amended them slightly by adding a note after “All Members” so I can tell which are being used). But the files in this directory are not used – the files used are in the directory twentynineteen/members – so I copied and amended them there as well but only the default index file is used, not the index-2 and members-loop-2.

    I have tried amending the path in the shortcode in everyway I can think of but no change.

    I am clearly missing something but I do not know what. Can you help please.

    #10327 Reply
    Michael Spencer
    Guest

    Sorry – forgot to add the page I am working on
    https://staging.cosrt.org.uk/register-search-test/

    #10330 Reply
    andrea
    Keymaster

    Hi Michael,

    Your shortcode

    [bps_directory template='members/index-2, members/members-loop-2']

    is correct, and it’s correct to put the new templates in the twentynineteen/buddypress/members directory.

    In the page you mentioned, I can see

    All Members -index 908

    and that means that your custom template is being used.

    If you can’t see it, please be sure to clear your browser’s cache and possibly other caches you’re using. Does that change anything?

    #10331 Reply
    Michael Spencer
    Guest

    Sorry but I think I have not made my point clear enough.

    I changed the default index template to have -index shown in this position (so I could see what files are used) and the index-2 template will have index2 in this position. Relevant code of index-2 as shown below

    <li class=”selected” id=”members-all”>“><?php printf( __( ‘All Members -index2<span>%s</span>’, ‘buddypress’ ), bp_get_total_member_count() ); ?>

    This is my problem – it uses the index.php file not the index-2.php file.

    #10332 Reply
    Michael Spencer
    Guest

    Hi Andrea,

    Sorry a further point – it is not using the files in twentynineteen/buddypress/members directory. As these files have would show
    bpindex or bpindex2 if they were being used. It appears to be using files from
    twentynineteen/members directory.

    #10336 Reply
    andrea
    Keymaster

    Hi Michael,

    Thank you for letting me use your staging site.

    For the record, we had to remove the twentynineteen/members directory, and now everything is working properly.

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: Create and use a new Members directory template
Your information: