• Resolved Ben

    (@benjaminloeffel)


    Hello Ultimate Member Community,

    I’m currently experiencing an issue with overriding the members-grid.php file in the Ultimate Member plugin, and I’m hoping someone could assist.

    WordPress Version: 6.2.2
    Ultimate Member Version: 2.6.3
    PHP Version: 8.1

    Description of the Issue:

    I am trying to override the members-grid.php file and have copied the original file into my theme directory following the path specified in the documentation (https://docs.ultimatemember.com/article/1516-templates-map). The path used is: wp-content/themes/{active_theme}/ultimate-member/.

    However, when I go to the Ultimate Member Override templates settings and click on ‘re-check templates’, the custom template file is not being recognized. Interestingly, the file is recognized if it’s moved further into the /wp-content/themes/{active_theme}/ultimate-member/templates/ directory. The file then appears in the table when I press ‘re-check templates’, but the overriding does not take effect.

    Steps to Reproduce:

    1. Copy members-grid.php to wp-content/themes/{active_theme}/ultimate-member/.
    2. Navigate to Ultimate Member settings.
    3. Click on ‘re-check templates’.
    4. The custom template is not recognized.

    Expected Result:

    The custom template should be recognized when ‘re-check templates’ is clicked, and the override should take effect.

    Actual Result:

    The custom template is not recognized unless moved further into the /templates/ directory. Even then, while it appears in the table after ‘re-check templates’ is clicked, the override does not take effect.

    This seems to be a bug, and I’d appreciate any assistance in rectifying this situation. If there are any further details or additional information needed, please let me know. Thanks in advance for your support!

    Best Regards,
    Ben

    • This topic was modified 1 year, 9 months ago by Ben.
Viewing 4 replies - 1 through 4 (of 4 total)
  • @benjaminloeffel

    You are 100% right, there is a bug in the new Template override function.

    I have verified how UM is looking for the custom templates by logging the calls by the function locate_template in the UM file class-functions.php and the documentation is right.

    The UM function is looking for customized member directory templates:

    locate_template: ultimate-member/members-grid.php
    locate_template: ultimate-member/members-list.php
    locate_template: ultimate-member/members-header.php
    locate_template: ultimate-member/members-pagination.php

    and customized members.php is located in ultimate-member/templates/members.php

    • This reply was modified 1 year, 9 months ago by missveronica.
    Thread Starter Ben

    (@benjaminloeffel)

    @missveronicatv

    Great, thank you for reproducing and posting the issue report on GitHub.

    I’ve subscribed to the new issue in case I can be of any help.

    Plugin Support andrewshu

    (@andrewshu)

    Hi @benjaminloeffel

    Thank you for your feedback. We will fix this in the next release.

    Regards

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Ultimate Member Template Override Issue: Custom Template File Not Recognized’ is closed to new replies.