I have a third party plugin where a user can login from any page and a popup or modal login form will appear. However, if a user is not logged and goes to any post and wishes to leave a comment, the link "You must login to post a comment" goes to the default wordpress login page. How can I change this to the modal form? The plugin doesn't have any custom settings to make this happen.
I have found the file, comment-template.php where to modify this action and this is the excerpt of the code where I think something should be inserted here to modify the action:
/** This filter is documented in wp-includes/link-template.php */
'must_log_in' => '<p class="must-log-in">' . sprintf( __( '     (<font color="blue"><a href="%s">Log in</a></font> to post a comment)' ), wp_login_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '</p>',
/** This filter is documented in wp-includes/link-template.php */
'logged_in_as' => '<p class="logged-in-as">' . sprintf( __( 'Logged in as <a href="%1$s">%2$s</a>. <a href="%3$s" title="Log out of this account">Log out?</a>' ), get_edit_user_link(), $user_identity, wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ) ) ) ) . '</p>',
'comment_notes_before' => '<p class="comment-notes"><span id="email-notes">' . __( 'Your email address will not be published.' ) . '</span>'. ( $req ? $required_text : '' ) . '</p>',
I am not a coder and have basic knowledge about this. I need help please from the community about what code should i write and where to insert the code(s) to make this happen.
If this helps, I am using the 'ZM Ajax LoginRegister' plugin. If you need any code from any of the plugin's php templates, I can paste snippets of the code here to make you guys help me easier.
Thank you Wordpress Authors and Wordpress Community.
Aucun commentaire:
Enregistrer un commentaire