Skip to:
Content
Pages
Categories
Search
Top
Bottom

Conditional PHP for Groups


  • bigkahunaburger
    Participant

    @bigkahunaburger

    Sorry if this is in the codex, but I couldn’t find it.

    How do I write this php:

    If group id 1 do this else do this

    Thanks

Viewing 1 replies (of 1 total)

  • Henry Wright
    Moderator

    @henrywright

    if ( $group_id == '1' ) {
        // Do this
    } else {
        // Do this
    }

    Note: You’ll need to get $group_id earlier on in your code.

Viewing 1 replies (of 1 total)
  • The topic ‘Conditional PHP for Groups’ is closed to new replies.
Skip to toolbar