• Hello,
    I’m using BP activity shortcode to display the “what’s new” activity form on posts.
    I edited your _maybe_load_scripts() function to have it run on posts:

         public function _maybe_load_scripts() {
                global $bp;
    
                if ( // Load the scripts on Activity pages
                    (defined('BP_ACTIVITY_SLUG') && bp_is_activity_component())
                    ||
                    // Load the scripts when Activity page is the Home page
                    (defined('BP_ACTIVITY_SLUG') && 'page' == get_option('show_on_front') && is_front_page() && BP_ACTIVITY_SLUG == get_option('page_on_front'))
                    ||
    				(is_single(''))
    				||
                    // Load the script on Group home page
                    (defined('BP_GROUPS_SLUG') && bp_is_groups_component() && 'home' == $bp->current_action)
                    ) {
                    add_action( "wp_enqueue_scripts", array (&$this, 'enqueue_scripts') );
                    add_action( "wp_print_scripts", array ( &$this, 'print_style' ) );
                }
            }
    

    Although the actual posted activity will be truncated, the script won’t show neither the countdown nor the “live” cut.. Any idea how to fix that?

    Best,

  • The topic ‘Limit activity published from shortcode’ is closed to new replies.