• rhovisions

    (@rhovisions)


    I have a small issue I hope someone can help me resolve.

    I’m trying to add a wordpress blog to my site, and more importantly, integrate my site’s login system with wordpress’s. I found online that including wp-blog-header.php and using

    wp_set_current_user($userInfo[‘userID’]);
    wp_set_auth_cookie($userInfo[‘userID’]);
    do_action(‘wp_login’, $userInfo[‘userID’]);

    Will log the user in. This part works perfectly as expected.

    The issue I’m having is that I also have a number of ajax requests on my site (not the blog) with jQuery. The blog is contained in a subfolder /blog, but because I’m including wp-blog-header.php, for some reason, when I do the ajax requests, it adds an attribute to the header “X-Pingback http://localhost/Gamers_Plane/blog/xmlrpc.php”, and because I’m using a dispatch system (all request are sent to dispatch.php, then the correct content is included), the request then fails (the ajax gets back the right response but returns a 404 because it can’t decipher what xmlrpc.php is).

    I’m hoping someone here could help me figure out if there is a way to avoid whatever is making the AJAX try to pull the xmlrpc.php but still allow the users to log in with my login code. Does anyone have any advice? Are there more specific files I can include that would allow users to login/logout? A variable/constant that I can set to not include the xmlrpc.php with the AJAX?

Viewing 1 replies (of 1 total)
  • Thread Starter rhovisions

    (@rhovisions)

    Actually, after a night of sleep, I realized since its giving me back the right response, but gives back the wrong status, I can still use the response to make my site work, just a lot slower.

    If anyone has any thoughts as to how I can disable the xpingback, I’d appreciate it.

Viewing 1 replies (of 1 total)

The topic ‘AJAX issues on WP parent site’ is closed to new replies.