Support » Plugin: BuddyPress Activity Plus » Any way to add bp activity plus links to whats-new-form?

  • Resolved pathuri


    I’m using ‘bp activity shortcode’ for displaying bp activity stream with various options, on any page or post.
    I’m able to display whats-new-form in the activity stream.
    But BP activity plus links are not appearing.
    Any way these links can be attached/added to whats-new-form?
    Otherwise bp activity plus links are appearing in various groups and standard ‘activity stream’ page.
    Pl let me know if there is any solution to this?

Viewing 15 replies - 1 through 15 (of 15 total)
  • Hi @pathuri,

    Thanks for posting on the forums.

    Could you please share me the page link where the BuddyPress Activity Plus links are not appearing in the whats-new-form so that i can help you to resolve the issue?

    Kind Regards,

    Same question asked on buddypress forums also :
    “@szed : Any luck with adding the buddypress-activity-plus icons with the buddypress activity shortcode plugin?”

    Pl check this page :

    Hi @pathuri,

    Thank you for your prompt reply.

    I tried to check it on your site by registering and logging in but i got the error message “ERROR: Your account is still pending approval.” so i downloaded the plugin ‘bp activity shortcode’ from the site and tested it on my test site.

    After testing i found BuddyPress Activity Plus buttons / links are not displaying on the whats new form generated by ‘bp activity shortcode’ plugin using the solution posted in this reply.

    So to resolve this issue i have just edited the following BuddyPress Activity Plus plugin file on line number 339

    BuddyPress Activity Plus plugin file:

    Before Editing:

    if (

    After Editing:

    if (

    Could you please try using the above solution and let me know whether it works for you or not?

    Note: You are making changes in the plugin file and these changes will be overwritten and lost when you update the plugin and you will have to make these again after plugin updation.

    If for anybody the solution posted in this reply doesn’t work then try changing the code provided in the solution as below.

    Before Editing:

    <?php locate_template( array( 'activity/post-form.php'), true ); ?>

    After Editing:

    <?php include_once( WP_PLUGIN_DIR.'/buddypress/bp-templates/bp-legacy/buddypress/activity/post-form.php'); ?>

    Best Regards,

    I will check and confirm.

    Hi! WPMUDEV!

    First solution is working fine (if (true ||)
    Second solution (mods to bp-activity-shortcode.php) is not working somehow.

    Thanks for all the SUPPORT!

    Hi @pathuri,

    That’s great news! Glad it’s working for you now 🙂

    Could you please share me the whole code that you have used for second solution(mods to bp-activity-shortcode.php) so that i can troubleshoot it?

    You can share me whole code through Google Drive, Dropbox, or other code / file sharing service. 🙂


    * Plugin Name: BuddyPress Activity Shortcode
    * Author: Brajesh Singh(BuddyDev)
    * Plugin URI:
    * Author URI:
    * Version: 1.0.2
    * License: GPL
    class BD_Activity_Stream_Shortcodes_Helper{

    private static $instance;

    private function __construct() {

    //register shortcodes


    * Register shortcodes
    private function register_shortcodes() {
    //[activity-stream display_comments=threaded|none title=somethimg per_page=something]

    add_shortcode( ‘activity-stream’, array( $this, ‘generate_activity_stream’ ) );

    * Get Instance
    * @return BD_Activity_Stream_Shortcodes_Helper
    public static function get_instance() {

    if ( !isset( self::$instance ) )
    self::$instance = new self();

    return self::$instance;

    public function generate_activity_stream( $atts, $content = null ) {
    //allow to use all those args awesome!
    ‘title’ => ‘Latest Activity’,//title of the section
    ‘pagination’ => ‘true’,//show or not
    ‘display_comments’ => ‘threaded’,
    ‘include’ => false, // pass an activity_id or string of IDs comma-separated
    ‘exclude’ => false, // pass an activity_id or string of IDs comma-separated
    ‘in’ => false, // comma-separated list or array of activity IDs among which to search
    ‘sort’ => ‘DESC’, // sort DESC or ASC
    ‘page’ => 1, // which page to load
    ‘per_page’ => 5, //how many per page
    ‘max’ => false, // max number to return

    // Scope – pre-built activity filters for a user (friends/groups/favorites/mentions)
    ‘scope’ => false,

    // Filtering
    ‘user_id’ => false, // user_id to filter on
    ‘object’ => false, // object to filter on e.g. groups, profile, status, friends
    ‘action’ => false, // action to filter on e.g. activity_update, new_forum_post, profile_updated
    ‘primary_id’ => false, // object ID to filter on e.g. a group_id or forum_id or blog_id etc.
    ‘secondary_id’ => false, // secondary object ID to filter on e.g. a post_id

    // Searching
    ‘search_terms’ => false, // specify terms to search on
    ‘use_compat’ => bp_use_theme_compat_with_current_theme()
    ), $atts );

    extract( $atts );

    ob_start(); ?>

    <?php if ( is_user_logged_in() ) : ?>
    <?php include_once( WP_PLUGIN_DIR.’/buddypress/bp-templates/bp-legacy/buddypress/activity/post-form.php’); ?>
    <?php endif; ?>
    <?php if( $use_compat):?>
    <div id=”buddypress”>
    <?php endif;?>

    <?php if($title): ?>
    <h3 class=”activity-shortcode-title”><?php echo $title; ?></h3>
    <?php endif;?>

    <?php do_action( ‘bp_before_activity_loop’ ); ?>

    <?php if ( bp_has_activities($atts) ) : ?>
    <div class=”activity <?php if(!$display_comments): ?> hide-activity-comments<?php endif; ?> shortcode-activity-stream”>

    <?php if ( empty( $_POST[‘page’] ) ) : ?>

    <ul id=”activity-stream” class=”activity-list item-list”>

    <?php endif; ?>

    <?php while ( bp_activities() ) : bp_the_activity(); ?>

    <?php bp_get_template_part( ‘activity/entry’); ?>

    <?php endwhile; ?>

    <?php if ( empty( $_POST[‘page’] ) ) : ?>

    <?php endif; ?>

    <?php if($pagination):?>
    <div class=”pagination”>
    <div class=”pag-count”><?php bp_activity_pagination_count(); ?></div>
    <div class=”pagination-links”><?php bp_activity_pagination_links(); ?></div>
    <?php endif;?>

    <?php else : ?>

    <div id=”message” class=”info”>
    <p><?php _e( ‘Sorry, there was no activity found. Please try a different filter.’, ‘buddypress’ ); ?></p>

    <?php endif; ?>

    <?php do_action( ‘bp_after_activity_loop’ ); ?>

    <form action=”” name=”activity-loop-form” id=”activity-loop-form” method=”post”>

    <?php wp_nonce_field( ‘activity_filter’, ‘_wpnonce_activity_filter’ ); ?>

    <?php if( $use_compat ):?>
    <?php endif;?>

    $output = ob_get_clean();

    return $output;




    Hi @pathuri,

    Thank you for sharing the code.

    You have added the provided code in the wrong place you should add it just before the following code.

    <?php if($title): ?>
        <h3 class="activity-shortcode-title"><?php echo $title; ?></h3>
    <?php endif;?>

    Is the solution posted in the following reply works for you?


    I’m using the solution posted in the link mentioned by you to show the new-form as part of bp-activity-short-code.
    The code from the link is added above the ‘title’ code exactly.
    The solution from the post was working fine but without BP AP+ links.
    That is when I posted this problem here.
    Then i tried your 2 solutions –
    (1) first solution works fine
    (2) second solution still doesn’t work even after moving the code to above the ‘title’ code (earlier it was above ‘use_compat code and now i shifted to above ‘title’ code).
    with my trials, it looks like 2nd solution doesn’t work.

    in my view, it is better if mod is part of bp-activity-shortcode.php file rather than modifying the bp-activity-plus code.

    pastebin link –

    Hi @pathuri,

    The solution is working fine for me using the latest versions of all.

    Could you please tell me which version of WordPress, BuddyPress and BuddyPress Activity plus plugins you are using?

    Are you using WordPress multisite or single site?


    I’m using all latest versions of wordpress, buddypress and BP A+.
    Mine is single site.
    Let me investigate further.
    Might be it is a conflict of some plug-in?

    Yes this can be due to plugin conflict. You can just try on your development site deactivating all other plugins and using default WordPress theme like Twenty Thirteen as displayed in this flowchart to know which theme/ plugin is conflicting if any.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘Any way to add bp activity plus links to whats-new-form?’ is closed to new replies.