Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

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

  • aido141176
    Participant

    @aido141176

    I want to list the activity for a specific group, not list of groups. I have not continued withe template method danbp. I’ve tried everything you mentioned including the bp_parse_args(). I just couldn’t get it to work. I could get it change the amount of list items but not display a selected group activity.

    But I have gone back to using the activity loop now, trying to incorporate the code you gave me.

    Here is the activity loop, how would you incorporate your code above:

    <?php if ( bp_has_groups() ) : ?>
     
        <div class="pagination">
     
            <div class="pag-count" id="group-dir-count">
                <?php bp_groups_pagination_count() ?>
            </div>
     
            <div class="pagination-links" id="group-dir-pag">
                <?php bp_groups_pagination_links() ?>
            </div>
     
        </div>
     
        <ul id="groups-list" class="item-list">
        <?php while ( bp_groups() ) : bp_the_group(); ?>
     
            <li>
                <div class="item-avatar">
                    <a href="<?php bp_group_permalink() ?>"><?php bp_group_avatar( 'type=thumb&width=50&height=50' ) ?></a>
                </div>
     
                <div class="item">
                    <div class="item-title"><a href="<?php bp_group_permalink() ?>"><?php bp_group_name() ?></a></div>
                    <div class="item-meta"><span class="activity"><?php printf( __( 'active %s ago', 'buddypress' ), bp_get_group_last_active() ) ?></span></div>
     
                    <div class="item-desc"><?php bp_group_description_excerpt() ?></div>
     
                    <?php do_action( 'bp_directory_groups_item' ) ?>
                </div>
     
                <div class="action">
                    <?php bp_group_join_button() ?>
     
                    <div class="meta">
                        <?php bp_group_type() ?> / <?php bp_group_member_count() ?>
                    </div>
     
                    <?php do_action( 'bp_directory_groups_actions' ) ?>
                </div>
     
                <div class="clear"></div>
            </li>
     
        <?php endwhile; ?>
        </ul>
     
        <?php do_action( 'bp_after_groups_loop' ) ?>
     
    <?php else: ?>
     
        <div id="message" class="info">
            <p><?php _e( 'There were no groups found.', 'buddypress' ) ?></p>
        </div>
     
    <?php endif; ?>

    I’m sorry if this is annoying you, I do appreciate your help. I’ve only been working with buddypress for about a week.

    Thanks


    aido141176
    Participant

    @aido141176

    Does anyone really know how to do this?


    aido141176
    Participant

    @aido141176

    Hi danbp, thank you for your response. Unfortunately I’m not sure how I can get this to work.

    Can you please show me a loop that will show all activity for say a group with ID 2. Or even with a slug, say ‘group_slug’.

    Here is the loop I am using:

    <?php if ( bp_has_activities( bp_ajax_querystring( 'activity' ) . "&primary_id=2" ) ) : ?>
    
    <?php while ( bp_activities() ) : bp_the_activity(); ?>
     
            <?php locate_template( array( 'buddypress/activity/entry.php' ), true, false ); ?>
     
        <?php endwhile; ?>
    <?php endif; ?>

    I tried both to incorporate your code into the activity loop but it didn’t work.

    I want display this activty not on a buddypress page. I want it to go on homepage. I can already get the group ID I just want to be able to make a loop that displays the activity of a curtain groupusing the group ID.

    If you could show me a whole complete loop that would work I would be really greatful.

    Thanks

Viewing 3 replies - 1 through 3 (of 3 total)
Skip to toolbar