Karen Doyle
asked 5 years ago

Hi,

We are using another registration/login plugin and we want to replace login/registration links.
Can you please wrote where to find in php and how to replace them.

Thanks,
Karen

2 Answers
DominicStaff
answered 5 years ago

Hi,
You can open the \wp-content\plugins\dw-question-answer\inc\template-functions.php file and then find the line 503.
$submit_question_link = wp_login_url( $submit_question_link );
You can add your link here:
$submit_question_link = ....;
You can send me username & password of your site, if you want to help.
Regards,

termoplus
replied 5 years ago

Hi,
Is this for login only?
How can I change registration link too?
Should it look like this right? $submit_question_link = https://website.com/login;
How about registration?
Correct?

dominic Staff
replied 5 years ago

You can open the \wp-content\plugins\dw-question-answer\inc\templates\default\answer.php file and then find the line 107.
printf( '%1$s <a href="%2$s" title="%3$s">%3$s</a> %4$s', __( 'Please login or', 'dwqa' ), wp_registration_url(), __( 'Register', 'dwqa' ), __( 'to Submit Answer', 'dwqa' ) );
Note: change the href='#'
About the login, should it look like this: $submit_question_link = " https://website.com/login";
Regards,

termoplus
replied 5 years ago

Hi Dominic,

I just want to confirm that I understood you correctly. Here is a screen http://prntscr.com/8rm35j

dominic Staff
replied 5 years ago

Yes, put your link in the quotes " ..."

rosemaryn
replied 5 years ago

Hello.
I want to change the login form also . I was able to change the Registration, but I can’t change the Login. It doesn’t work.

dominic Staff
replied 5 years ago

Have you tried to change the code look like this:
In the \wp-content\plugins\dw-question-answer\inc\template-functions.php file and then find around line 503.
Replace the following code: $submit_question_link = wp_login_url( $submit_question_link );
With new code: $submit_question_link = "https://website.com/login";
If you still face there issue, you can send me username & password of your site (via private answer) I will help you check and resolve it.
Hope this helps !

Henrik Gregersen
answered 5 years ago

If I change this file, then how can I protect the plugin from future updates, without loosing my changes

dominic Staff
replied 5 years ago

In case you want update without losing the customization you made with the older DW Q&A plugin version. Before updating the latest version, please mark and copy all files that you edited, then update to the latest version.
After finishing, you add all customized code to your theme.
Note: At the moment, you only possible change link from php file.
Regards,

Powered by DW Question & Answer Pro