Skip to:
Content
Pages
Categories
Search
Top
Bottom

Query/Call @mentions List

  • @alanchrishughes

    Participant

    If you wanted to create a unique page that includes a list of your @mentions like on the actual mentions page, would that be possible somehow? I’ve never been able to figure out how Buddypress calls up each list, I’m pretty sure it’s magic.

Viewing 9 replies - 1 through 9 (of 9 total)
  • @gunju2221

    Participant

    If you want to have it on a different page, just change the permalink on the profile to something different, or “URL”. This may help. https://codex.buddypress.org/extending-buddypress/customizing-labels-messages-and-urls/

    @alanchrishughes

    Participant

    @Virtuali @gunju2221 I’m not trying to change the URL of the page it is already on, I am wanting to put it on an additional page.

    @alanchrishughes

    Participant

    Any ideas? I’m sure it won’t be as easy as WordPress and querying things like

    ?php query_posts(“category_name=?php echo bp_loggedin_user_domain()@mentions”);
    ?php while (have_posts()) : the_post();

    but is there anything similar?

    @djpaul

    Keymaster

    Nothing magical. It’s the regular activity stream loop (look in /activity/activity-loop.php if you need a reference). In your call to bp_has_activities(), set ‘scope’ to ‘mentions’. This may need some trial and error, but like this:

    `if ( bp_has_activities( ‘scope=mentions’ ) )`

    @alanchrishughes

    Participant

    Thanks @djpaul

    Do you know how you would write that to include favorites also?

    @alanchrishughes

    Participant

    I’ve tried a few obvious things like

    if ( bp_has_activities( ‘scope=mentions&favorites’ ) )

    @djpaul

    Keymaster

    Scope has to be a single keyword at the moment. This sounds like a good enhancement request; could you post on https://trac.buddypress.org/, using your username and password from this site? Thanks.

    @alanchrishughes

    Participant

    @djpaul will do. Do you know any other way of accomplishing this? Ultimately my goal is just to have all activity stream through one page (everything but the activity of your friends).

    PS: https://buddypress.trac.wordpress.org/ticket/3192

    @candy2012

    Member

    nothing here either !??!

    using the if ( bp_has_activities( ‘scope=mentions’ ) ) is messing up the load function on the bottom by the way … so if you click on load, all the already loaded actions will be loaded again … 2 times, 3 times, n times, as many times you click on “load” :-(

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Query/Call @mentions List’ is closed to new replies.
Skip to toolbar