miszczu
Member
Posted 11 months ago #
Hi All,
I have a problem with "Dave's WordPress Live Search" plugin. It works fine but user have to be logged in. Otherwise it doesn't show results.
I have checked source and except few lines, html code looks the same. I thought it could be admin-ajax, but I have access to all files from source even if I'm not logged in.
Any ideas?
http://wordpress.org/extend/plugins/daves-wordpress-live-search/
Hi miszcu,
Saw your Stack Exchange post but it looks like they closed it to additional answers.
admin-ajax.php is the standard way to do AJAX in WordPress, for both admins & regular users. At one time it was just used for the admin screens, but they decided to re-use it for everybody and now we're stuck with it.
Usually when I see this issue, it's because someone added a rule to their .htaccess file to password protect the wp-admin directory. I know there are a lot of tutorials saying to do this for security, but you need to open up access for admin-ajex.php and a few other files.
I really recommend this page in the WordPress Codex on hardening WordPress and this blog post with a better .htaccess configuration that allows access to the necessary files.
Hope that helps!
- Dave
miszczu
Member
Posted 11 months ago #
Hi Dave,
Thank you for quick respond, I took some1 advice and create copy of admin-ajax.php and I use new file for this plugin only. I have change define('WP_ADMIN', true); to define('WP_ADMIN', false); and works fine for me without any changes in .htaccess file, passwords and all this crap. I think this way is faster and dont confuse. With the privies method I was little bit lost.
Thank you anyway
miszczu