WordPress.org

Ready to get started?Download WordPress

Forums

Dave's WordPress Live Search
live search works for logged users only (3 posts)

  1. miszczu
    Member
    Posted 2 years 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/

  2. Dave Ross
    Member
    Plugin Author

    Posted 2 years ago #

    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

  3. miszczu
    Member
    Posted 2 years 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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic