How can I change the default login URL (wp-login.php ) ? in your template file used do_action( ‘dwqa_submit_question_ui’ ); , how can edit this hook into my theme ?
@Sudip Roy : Well , can’t change the default login URL (wp-login.php ) in your theme, To do that , you need to edit htaccess file , or Use plug-in.. ect…
The using of do_action( ‘dwqa_submit_question_ui’ ); and
add_action( 'dwqa_submit_question_ui', 'dwqa_require_field_submit_question' ); not use to change the default login URL but i’ll lead you to your own custom login page/form.
I think the point here is that you want to create your own login page ? and then when click login , It’ll lead to that page , not default Wp_login page??
i quickly hacked this to get the same result.
you need to edit this file : ../dw-question-answer/inc/template-functions.php
comment this line (114)
<?php c printf( __( ‘or <a href="%s">login to submit question’, ‘dwqa’ ), wp_login_url( apply_filters( ‘the_permalink’, get_permalink( get_the_ID() ) ) ) ) ?>
replace it with this code and subistitute "XXXXXXXXXXXXXXXXX" with the url of your frontend login page ( http://www.yoursite.com/login.php or whatever)
<?php printf( __( ‘or <a href="XXXXXXXXXXXXXXXXX">login to submit question’, ‘dwqa’ ), wp_login_url( apply_filters( ‘the_permalink’, get_permalink( get_the_ID() ) ) ) ) ?>
@nobita : please let us know when you will override this function to allow administrator to use their personal login page, we find it very important.
I use DW question&answer plugin with woocommerce. So customer role of woocommerce have difference login page with admin login page, i thing it’s important here because we can avoid some security problem(like brute force attack to admin account…).
So my customers want to ask question, too, but they will be redirect to admin login page (that not unfamiliar with them, that difference with the time they buy products on website) and some bad guy can know truly admin login url.
So why not put only line : "or login to ask question" of section in question-submit-form.php template:
<?php do_action( ‘dwqa_submit_question_ui’ ); ?>
out of that action.
In answers.php template, you can easily change login page so i think in question page, it should let we change login url like that
I agree ?
Please login or Register to submit your answer
replied 8 years ago
@pietrov : thank you , you got it . in here we use the function
wp_login_url();for that button that will lead you to the login page. And in back-end and if you set the option that an anonymous can post, we will have different form for user to write information ( email,name ) and no need to login.
At this time , if this plug-in doesn’t support a custom login page so we just use wp_login_url.
For Roy issue, i think we need to add a new action like this :
and then place the login function where u want with the code :
There are plenty ways to make custom login page for your wordpress site.
Or for more convenient you can try modal login like our page : http://www.designwall.com/. I can help.