Skip to:
Content
Pages
Categories
Search
Top
Bottom

Mobile Theme

  • Avatar of BeLogical
    BeLogical
    Participant

    @belogical

    I’m trying to create a very basic mobile theme. The only pages I currently have in my theme are:

    #1) index.php (my mobile page)

    #2) style.css (so I can activate my theme in the dash)

    When I try to create variables like this, $user_id = $bp->loggedin_user->id, the $user_id is blank.

    What am I missing in order for these variables to work?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Avatar of BeLogical
    BeLogical
    Participant

    @belogical

    bump

    Avatar of Tim Moore
    Tim Moore
    Participant

    @nullcrash

    If you are writing your own functions, you need to make sure and declare:

    global $bp;

    at the very top of the function. Otherwise the function doesn’t know where $bp is getting set and treats all variables as blank.

    Avatar of wpmubp.org
    wpmubp
    Participant

    @takuya

    I think it’s easier to get started with skelton theme…

    Avatar of BeLogical
    BeLogical
    Participant

    @belogical

    i think i had the global $bp and it still didn’t work. i ended up pulling the data another way. thanks for the response.

Viewing 4 replies - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.