Ashish Yadav
asked 10 years ago

I use your plugin on my site. For logged in users the filters dont work but for logged out ones they do.
What I have infered from the research I did is that the ajax is not called in the logged in case.
My wordpress version is a bit old. I cannot update it as I have made many changes to the core files.
Please help me out as I really like your plugin and dont want to change it.

I think the plugin is not compatible properly with the older versions of wordpress.

Ashish Yadav
replied 10 years ago

I have found the solution to the problem.
In wp-content/plugins/dw-question-answer/inc/filter.php line 169 I commented out $args['perm'] = 'readable';
This made the ajax calling normal and filters started working.
Please look into this thing and let me know what this variable is used for and how was this causing the issue.

1 Answers
answered 9 years ago

$args[‘perm’] = ‘readable’;
this variable is used for:$wp_query = new WP_Query( array( ‘perm’=>’readable’ ) );

This returns any posts/questions and the current users who already logged have permission to read. If they are logged out, then they only have permission to read published and non-private posts. Only the author of the question and admin can read the private posts.

Sounds like you have an other issue with another plugin or function has ajax call. Please check again.

Powered by DW Question & Answer Pro