Skip to:
Content
Pages
Categories
Search
Top
Bottom

overwrite who's online widget theme

  • Profile photo of divyesh25
    divyesh25
    Participant

    @divyesh25

    hi all,

    Any one know how to overwrite who’s online widget theme because i want to display online user on page see in image. if theme overwrite not possible please suggest me custom code.

    who's online

Viewing 4 replies - 1 through 4 (of 4 total)
  • Profile photo of danbp
    danbp
    Moderator

    @danbp

    Hi @divyesh25,

    this widget is built in bp-core/bp-core-widgets.php:309 (bp 2.0.2)

    To modify his aspect you only have to modify the CSS. Best practice is to do that from within a child-theme.

    To get the widget on your custom page, you have to create a new widget area on it. See this tutorial.
    Once done, you asign the widget to this area, modify the css accordingly and voilà.

    References

    https://codex.wordpress.org/WordPress_Widgets

    https://codex.wordpress.org/Widgetizing_Themes

    Profile photo of divyesh25
    divyesh25
    Participant

    @divyesh25

    thanks danbp. i am create Widget Area Using Custom Function but and evrthing look good.
    but one problem is there i want to display online user except admin.(means i want to hide admin avatar from widget or some other way).

    thanks

    Profile photo of divyesh25
    divyesh25
    Participant

    @divyesh25

    hi

    how to show number of user online in who’s online widget?

    thanks.

    Profile photo of danbp
    danbp
    Moderator

    @danbp

    how to show number of user online in who’s online widget?
    this is not intended in the BP widget.
    You can create your own widget and use an external service or script to get users stats (online, offline, robots) or activate a plugin, like this one.

    Excluding admin from this widget and/or from activities and so on needs soming extra work.
    I already answered a same question a few days back and give an example.
    But you have to code the missing part concerning the who’s online widget.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘overwrite who's online widget theme’ is closed to new replies.