+1, a filter for changing those templates would be great, if a custom template should be used.
It may be a good idea to use WordPress built-in load_template (https://developer.ww.wp.xz.cn/reference/functions/load_template/) and get_template_part (https://developer.ww.wp.xz.cn/reference/functions/get_template_part/) functions in the plugin,
those offer intelligent template loading and overriding.
-
This reply was modified 4 years ago by
strarsis. Reason: remove links (as code-formatted text doesn't render correctly as link)
So the idea is to load the file from plugin directory and replace it by the file in the theme?
Is there any example for that
thanks for your help
When loading the template using load_template , the page is showing duplication of the part that I have included. Do you have an idea about this
Hi,
Unfortunately we don’t have filers for those at the moment but will consider adding some in future releases.
Alternately, you can simply replace include_once(WPABSTRACTS_PLUGIN_DIR . ‘users/register.html.php’); in the register.php file with the path of your custom template when the filters are added in the future you can simply add a filter with the path to your custom template for the same effect.
Please let me know if you have more questions,
Kevon A
thanks but if that will not affect updates?
@ahmedmymail: You would want to fork the plugin, add your changes in a separate branch. When new updates for the plugin are published (“upstream”) you would pull them to the main branch and merge it into the separate branch.
Hopefully in the near future native WordPress template support is added to this plugin so you don’t have to maintain a fork.