• Resolved Mike8857

    (@mike8857)


    I’m new at this but was able to change the label from Username to Badge Number:

    <div class="swpm-username-label">
         <label for="swpm_user_name" class="swpm-label"><?php echo SwpmUtils::_('Badge Number or Email') ?>
         </label>
     </div>

    I did that by editing the simple-membership plugin directly. How can I make that change using a plugin that I create so the change won’t get overwritten when the plugin gets an update?

    Thank you

    • This topic was modified 4 years, 2 months ago by Mike8857.

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter Mike8857

    (@mike8857)

    I found this documentation for this specific task that works fine but the child thems can’t be used so I created a folder inside the theme folder:

    Widget Edits

    My concern is that this folder will get overwritten when the theme is updated. Is this a concern?

    I don’t think there is a way to create a child theme for widgets. Unless the plugin author provide that option in their settings. Yes the update to the plugin will override any custom edits to the plugin code.

    You can also try contacting the plugin developer for adding such options. https://en-ca.www.ads-software.com/plugins/simple-membership/

    Moderator bcworkz

    (@bcworkz)

    Depending on how the plugin loads template files in the theme, you might be able to filter the path used so the template is fetched from your own custom plugin instead of a child theme. This works with normal theme templates like single.php by using the “template_include” filter to watch for attempts to include single.php and altering its path to get a template from a plugin folder instead.

    There’s a chance “template_include” could work for this template as well, or maybe the developer has provided their own filter for such a purpose. Probably unlikely on both counts, but we wouldn’t know unless we know to look for such an option in the first place.

    Thread Starter Mike8857

    (@mike8857)

    Thank you for suggesting template_include as an avenue that I should explore. I see the doc here

    https://developer.www.ads-software.com/reference/hooks/template_include/

    Thank you

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Can I use a plugin to change HTML label?’ is closed to new replies.