I have developed an app in ionic in which I am retrieving posts from my WordPress site. Now I want my registered users in the app to be able to post comments in the posts on Wordpress site without authentication and without typing the name and email each time.

I was able to add comments by adding a filter in my functions.php

function filter_rest_allow_anonymous_comments() {
return true;
add_filter('rest_allow_anonymous_comments', 'filter_rest_allow_anonymous_comments');

and was also able to remove name and email by disabling the "Comment author must fill out name and email" in discussions setting. but after doing this the Wordpress site is taking 'anonymous' as a by-default name.

So what I wanted to ask is -- Is there some way to display my registered user's name in the app when they are posting the comment automatically?

Thanks in advance.

  • 2
    how do you know which user is sending the comment if there is no authentication ? – mmm Jun 22 '18 at 15:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.