Skip to:
Content
Pages
Categories
Search
Top
Bottom

comment button missing in activity stream for custom post types


  • haitianguy
    Participant

    @haitianguy

    Hello,
    i hope someone can help me because i am driving myself crazy at this point. im fairly new to wordpress and thought that i would give it a shot to try and have the themes custom post “video” show up in the activity stream as well as merge their comments. finding this link in the codex, https://codex.buddypress.org/plugindev/post-types-activities/

    i managed to have this in my bp-custom.php

     function customize_page_tracking_args() {
     
        if ( ! bp_is_active( 'activity' ) ) {
            return;
        }
     
        add_post_type_support( 'video', 'buddypress-activity' );
     
       
        bp_activity_set_post_type_tracking_args( 'video', array(
            'action_id'                         => 'new_video',
            'bp_activity_admin_filter'          => __( 'Published a new video', 'custom-textdomain' ),
            'bp_activity_front_filter'          => __( 'Video', 'custom-textdomain' ),
            'bp_activity_new_post'              => __( '%1$s posted a new <a href="%2$s">video</a>', 'custom-textdomain' ),
            'bp_activity_new_post_ms'           => __( '%1$s posted a new <a href="%2$s">video</a>, on the site %3$s', 'custom-textdomain' ),
            'contexts'                          => array( 'activity', 'member' ),
            'comment_action_id'                 => 'new_video_comment',
            'bp_activity_comments_admin_filter' => __( 'Commented a video', 'custom-textdomain' ),
            'bp_activity_comments_front_filter' => __( 'Video Comments', 'custom-textdomain' ),
            'bp_activity_new_comment'           => __( '%1$s commented on the <a href="%2$s">video</a>', 'custom-textdomain' ),
            'bp_activity_new_comment_ms'        => __( '%1$s commented on the <a href="%2$s">video</a>, on the site %3$s', 'custom-textdomain' ),
            'position'                          => 100,
        ) );
        
    }
    add_action( 'bp_init', 'customize_page_tracking_args' );
    

    now only some of the activity shows up as there is no thumbnail image or a comment button. i might have misunderstood but i thought this would be all i needed. also i have alread enabled site tracking, indexing and allowed comments everywhere.

    here is the themes cpt registration where var $post_type = ‘video’;:

    
    	function register() {
    		    
    		  
    			register_post_type( $this->post_type, array(
    				'labels' => array(
    					'name' => __('Videos', 'themify'),
    					'singular_name' => __('Video', 'themify'),
    					'add_new' => __( 'Add New', 'themify' ),
    					'add_new_item' => __( 'Add New Video', 'themify' ),
    					'edit_item' => __( 'Edit Video', 'themify' ),
    					'new_item' => __( 'New Video', 'themify' ),
    					'view_item' => __( 'View Video', 'themify' ),
    					'search_items' => __( 'Search Videos', 'themify' ),
    					'not_found' => __( 'No Videos found', 'themify' ),
    					'not_found_in_trash' => __( 'No Videos found in Trash', 'themify' ),
    					'menu_name' => __( 'Videos', 'themify' ),
    				),
    				'supports' => array('title', 'editor', 'thumbnail', 'custom-fields', 'excerpt', 'comments'),
    				'hierarchical' => false,
    				'public' => true,
    				'exclude_from_search' => false,
    				'query_var' => true,
    				'can_export' => true,
    				'capability_type' => 'post',
    				'has_archive' => 'video-archive',
    				'menu_icon' => 'dashicons-format-video',
    				
    
    "taxonomies"=>array("category"),
    			));
    			register_taxonomy( $this->tax, array( $this->post_type ), array(
    				'labels' => array(
    					'name' => __( 'Video Categories', 'themify' ),
    					'singular_name' => __( 'Video Categories', 'themify' ),
    				),
    				'public' => true,
    				'show_in_nav_menus' => true,
    				'show_ui' => true,
    				'show_tagcloud' => true,
    				'hierarchical' => true,
    				'rewrite' => true,
    				'query_var' => true,
    			));
    			register_taxonomy( $this->tag, array( $this->post_type ), array(
    				'labels' => array(
    					'name' => __( 'Video Tags', 'themify' ),
    					'singular_name' => __( 'Video Tags', 'themify' ),
    				),
    				'public' => true,
    				'show_in_nav_menus' => true,
    				'show_ui' => true,
    				'show_tagcloud' => true,
    				'hierarchical' => false,
    				'rewrite' => true,
    				'query_var' => true,
    			));
    			if ( is_admin() ) {
    				add_filter('manage_edit-'.$this->tax.'_columns', array( $this, 'taxonomy_header' ), 10, 2);
    				add_filter('manage_'.$this->tax.'_custom_column', array( $this, 'taxonomy_column_id' ), 10, 3);
    
    				add_filter('manage_edit-'.$this->tag.'_columns', array( $this, 'taxonomy_header' ), 10, 2);
    				add_filter('manage_'.$this->tag.'_custom_column', array( $this, 'taxonomy_column_id' ), 10, 3);
    			}
    		}
    

    the site is https://balalatet.com/activity/ if you’d like to see
    Please help

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • You must be logged in to reply to this topic.
Skip to toolbar