Some of my questions and answers have not author assigned to them. In our DWQA settings, only registered users can post questions and answers.
Any idea what’s happening?
Please send me username & password of your site for further checking. I have checked the plugin on our demo and see that the plugin still work fine.
I figured it out Dominic.
My registration form doesn’t have First and Last Name (using Ultimate Member plugin) it just has Username. By default WordPress will set the “Display name publicly as” field to the First and Last name. But since we don’t have those fields, it’s set to just be blank.
Is there a way to have DWQA use the Username as the name that’s displayed as the Author? Thanks!
To show the username, you can create a folder “dwqa-templates” in the folder theme then go to the wp-content/plugins/dw-question-answer/templates
then copy/paste the
content-single-question.php, content-single-answer.php, content-question.php, content-comment.php files into “dwqa-templates” folder.
Open the files find the following code:
get_the_author()
And replace with the following code:
get_the_author_meta( ‘nickname’, $author_id )
Thank you Dominic. This works on the single question page, but how do I make this work on the Qusetions page which lists all of the questions?
you can change in the content-question.php
Dominic, when I replace the code on the content-question.php file, it doesn’t change to nickname. In fact, all the author names disappear completely.
Figured it out, when I copied your code it gave me the wrong single quote mark. It was curly instead of straight.
This is resolved.
Yes, if you have any issue or question, you can let me know. We will help you resolve it.
Please login or Register to submit your answer