Any way to add in a “Sort by” toggle?
-
On the top of the activity stream there is a dropdown to show activies that are “Everything”, “Updates”, “Friendships” etc
This is the code in /activity/index.php
<ul> <li class="feed"><a href="<?php bp_sitewide_activity_feed_link(); ?>" title="<?php esc_attr_e( 'RSS Feed', 'buddypress' ); ?>"><?php _e( 'RSS', 'buddypress' ); ?></a></li> <?php /** * Fires before the display of the activity syndication options. * * @since 1.2.0 */ do_action( 'bp_activity_syndication_options' ); ?> <li id="activity-filter-select" class="last"> <label for="activity-filter-by"><?php _e( 'Show:', 'buddypress' ); ?></label> <select id="activity-filter-by"> <option value="-1"><?php _e( '— Everything —', 'buddypress' ); ?></option> <?php bp_activity_show_filters(); ?> <?php /** * Fires inside the select input for activity filter by options. * * @since 1.2.0 */ do_action( 'bp_activity_filter_options' ); ?> </select> </li> </ul>
Any way to somewhat easily go about adding a button next to it to (also through ajax) update the feed to sort in ASC or DESC order? Really just looking for some key functions or where to start, thanks.
- You must be logged in to reply to this topic.