Support » Fixing WordPress » Functions from Outside WP Directory

  • I’m having a bit of trouble accessing certain functions from outside the WP directory. I’ve tried the concepts in forum topics 110944 and 129169 to no avail.

    What I have on my site is a main page, in a directory above the wordpress installation, that uses RSS feeds to pull information in from various parts of my site. However, because all of the site’s login information (Gallery2, SMF) is handled by wordpress (via bridge plugins) I’d like to provide a login form on this main page, and pass that information to wordpress. I’d also like to be able to access various information from my wordpress plugins (i.e. users online, etc).

    The problem is that even when I include wp-blog-header.php I can’t seem to access information on the currently logged in user. For example, the following code never returns anything, even when a user is logged in:

    global $userdata;
    echo(‘Username: ‘ . $userdata->user_login . “\n”);

    Interestingly enough, I AM able to get information on the current number of online users (WP-UserOnline plugin) IF I also call get_header(); However, I obviously don’t want to call get_header() because that brings in a bunch of stuff from my wordpress theme which I don’t want included on the mainpage. If I don’t call get_header(), then wp-useronline always returns 0 users.

    Any ideas??


  • The topic ‘Functions from Outside WP Directory’ is closed to new replies.