Skip to:
Content
Pages
Categories
Search
Top
Bottom

Search Results for 'custom activity page'

Viewing 25 results - 51 through 75 (of 831 total)
  • Author
    Search Results
  • webcarabao
    Participant

    Hi All,

    Is there a way to override the rendered image for the avatar photo on the What’s New form in the Activity page?
    I have applied the necessary custom values mentioned here – https://codex.buddypress.org/themes/guides/customizing-buddypress-avatars/
    But that does not seem to apply to the What’s New avatar.

    I am using the “Nouveau” template and I look as its files and I cannot see anything to directly override the whats-new-avatar size.

    I have set in my bp-custom.php the sizes to be 150, but the whats-new-avatar image being used still sticks to 50 and thus it becomes blurry.

    I hope somebody can help me on this.

    Thank you!

    lighthousejack
    Participant

    Hello all,
    I am looking to create a page with two loops.

    The first would fetch a given number of custom post type posts with each entry with it’s own custom markup and the second loop would display the standard global activity feed as usual (which will also include the custom post type entries).

    I have managed so far to create the custom post type and integrate the custom post type entries in the global activity feed but I cannot seem to find a way how to create the second feed and how to tell it what to show.

    Any help/ direction would be greatly appreciated.

    Thanks!

    mohamettarik
    Participant

    Hello and thanks for support,

    I have WooCommerce website and integrated BuddyPress for customers community.

    I had a landing page as a static home page for my site, but unfortunately BuddyPress activity page is a dominant home page now.

    Checked the site home page from site settings, it is my landing page.
    Checked BuddyPress settings pages and nothing to edit as home page or else.

    Also when I tried to access my best from different device, it asks me to activate account and provide activation key… it seems weird because my website have a landing page open for all people.

    #320246
    mjaitly123
    Participant

    Hi,

    I am using elementor but after disconnecting the group pages from BuddyPress Pages, I import a template and save the page. Then I again connect the page to BuddyPress Groups. However, after the connection, the formatting is all lost and the page appears plain white. How can I avoid this? I am asking because I want to give a background colour to the activity, group and members pages. If I use a templated after importing it. does Buddypress suppress all the formatting in the template?

    Thanks

    #320158
    pooriaarab
    Participant

    Hi Shane,

    Thanks for the quick reply and it actually worked! Thank you 🙂

    The sidebar shows for a specific user type now but it shows up in the wrong location. I tried the code in different places but it’s in the middle of the profile now and want it to be on the left side like the normal sidebar for user profile.

    The first part of the code is the simplified version you mentioned and the css styling. The rest is the remaining of the loop on that page. I suppose the code should go somewhere in there:

    </div><!-- #item-body -->
                <?php
                $member_type = bp_get_member_type( bp_displayed_user_id() );
           if ( $member_type == 'club' ) {?>
               <div id="secondary" class="widget-area sm-grid-1-1 no-padding-top" role="complementary">
                   <div class="bb-sticky-sidebar">
                       <?php dynamic_sidebar( 'club_sidebar'); ?>
                   </div>
               </div>
           <?php
            }
           
           ?>
       <?php
                    
                if ( ( !isset($bp_nouveau_appearance['user_nav_display']) || !$bp_nouveau_appearance['user_nav_display'] ) && is_active_sidebar('user_activity') && bp_is_user_activity() ) {
    
    				ob_start();
    				dynamic_sidebar('user_activity' );
    				$sidebar = ob_get_clean();  // get the contents of the buffer and turn it off.
    				if ( trim( $sidebar ) ) { ?>
    					<div id="user-activity" class="widget-area" role="complementary">
    						<div class="bb-sticky-sidebar">
    							<?php dynamic_sidebar( 'user_activity' ); ?>
    						</div>
    					</div><?php
    				}
    			}
              
    			if ( ( !isset($bp_nouveau_appearance['user_nav_display']) || !$bp_nouveau_appearance['user_nav_display'] ) && is_active_sidebar( 'profile' ) && !bp_is_user_settings() && !bp_is_user_messages() && !bp_is_user_notifications() && !bp_is_user_profile_edit() && !bp_is_user_change_avatar() && !bp_is_user_change_cover_image() && !bp_is_user_front() && $profile_cover_width == 'full' ) {
    
    			    ob_start();
    	            dynamic_sidebar('profile' );
    	            $sidebar = ob_get_clean();  // get the contents of the buffer and turn it off.
    				if ( trim( $sidebar ) ) { ?>
    					<div id="secondary" class="widget-area sm-grid-1-1 no-padding-top" role="complementary">
    						<div class="bb-sticky-sidebar">
    							<?php dynamic_sidebar( 'profile'); ?>
    						</div>
    					</div>
    					<?php
    				}
    			}
    			?>
    		</div>
    
    	</div><!-- // .bp-wrap -->
        	<?php if ( isset($bp_nouveau_appearance['user_nav_display']) && $bp_nouveau_appearance['user_nav_display'] &&  is_active_sidebar( 'profile' ) && !bp_is_user_settings() && !bp_is_user_messages() && !bp_is_user_notifications() && !bp_is_user_profile_edit() && !bp_is_user_change_avatar() && !bp_is_user_change_cover_image() && !bp_is_user_front() && $profile_cover_width != 'default' ) { ?>
    			</div>
    
    			<?php
    			ob_start();
    			dynamic_sidebar('profile' );
    			$sidebar = ob_get_clean();  // get the contents of the buffer and turn it off.
    			if ( trim( $sidebar ) ) {
    				?>
    				<div id="secondary" class="widget-area sm-grid-1-1 no-padding-top" role="complementary">
    					<div class="bb-sticky-sidebar">
    						<?php dynamic_sidebar( 'profile'); ?>
    					</div>
    				</div>
    				<?php
    			}
    			?>
    

    This is a screenshot of where the sidebar is appearing:

    Certificates is in the middle. How can it be in the place of cart?

    -How can I move the sidebar (Certificates) to where the left sidebar (Cart) is?

    -And how can I repeat this process for 3 different user types? 3 custom sidebars for 3 user types.

    -I was not sure what “ob_start()” and “bp_nouveau_appearance” were that appear in the beginning of the other sidebar code. How can I add them to the custom sidebar? Are they even necessary?

    Appreciate the support and the community around BuddyPress

    benofinil
    Participant

    Hello !

    First of all, I apologize if the answer already exists, but I am new to the php language, and I do not understand much …

    I created a website for an organization, and I set up a community space thanks to Buddy Press and Youzify.

    Here is my question: I want to make this space completely closed, and not accessible to non-logged in users. I tried putting this php code in wp-content / plugins / bp-custom.php:

    <? php
    / **
    * Redirect the Buddypress directories to the login page for non logged in users.
    * /
    function yzc_redirect_bp_directories_to_login_page () {

    if (! is_user_logged_in () && (bp_is_groups_directory () || bp_is_members_directory ())) {

    // Get pages Buddypress;
    $ bp_pages = get_option (‘bp-pages’);

    // Get the redirection URL
    $ redirect_url = youzify_get_login_page_url ();

    wp_redirect ($ redirect_url);
    go out();
    }
    }

    add_action (‘template_redirect’, ‘yzc_redirect_bp_directories_to_login_page’);

    Now unconnected users cannot have access to member directory and groups directory, but I would like to block access to all BuddyPress pages (such as member profile pages, activity page. ..) and redirect to the login page.

    Could someone help me complete this piece of code?
    Thank you for your help

    Mathieu Viet
    Moderator

    I’m bit amazed by this

    enabled direct registration of new members and disabled email confirmation

    As far as I know, a user registering from the front-end (managed by BuddyPress) is first receiving an email containing a secret key he needs to paste into the BuddyPress activate page to validate their account. But maybe you are using a plugin or some custom code to disable this..

    Otherwise, you can achieve what you describe adding the following code snippets to a bp-custom.php file.

    
    /**
     * Adds activities generated when a user activates their account when a user
     * is created using the wp-admin/user-new screen Add new action.
     */
    function automatically_generate_an_activation_activity( $user_id = 0 ) {
    	// Adds a "became a registered user" activity.
    	bp_core_new_user_activity( $user_id );
    
    	// Fake a user log in.
    	bp_update_user_last_activity( $user_id );
    }
    add_action( 'edit_user_created_user', 'automatically_generate_an_activation_activity' );
    
    homelesshenry
    Participant

    I’m trying to change the excerpt length for the activity feed. And I can’t figure out why it’s been so difficult.

    For example, I’ve used the following code:

    function buddydev_modify_excerpt_length( $length ) {
    	$length = 1225;
    
    	return $length;
    }
    add_filter('bp_activity_excerpt_length', 'buddydev_modify_excerpt_length' );

    I even went into bp-core/bp-core-template.php for a hard-coded solution:

    function bp_create_excerpt( $text, $length = 1225, $options = array() ) {

    Still it doesn’t change my excerpt length. I then thought it might be the theme I’m using (Buddyboss) and went poking around but couldn’t find anything; although maybe there is something and I didn’t look well enough.

    Otherwise, could it have anything to do with the activity feed posts in question being added post types (woocommerce product pages) via the guide by Mathieu Viet:

    Post Types Activities

    Anyone else have similar issue or know what it might be?

    sx1001
    Participant

    Hi all,

    is there any generic way to add a new input dropdown (select) element to every content users create within my buddypress page? That includes: UserBlog, Group Posts, Activity Posts, Forum posts?

    Later on this attribute should be printed as HTML data-attribute on that particular <div> container.

    I guess I could figure out myself all the hooks required – but Id highly appreciate an indication of the best way to go, clean and concise. Maybe I’ll just require one hook / extension of a content class!?

    Thanks so much in advance!

    #318895
    trapsen
    Participant

    Hello,

    I am currently trying to assign my CSS to the individual BuddyPress / Youzify pages using the conditional tags. Unfortunately, I am failing in the “Activity” classes

    I have divided the CSS classes as follows:

    Global
    Profile
    Account
    Activity
    Members
    Groups
    Messages

    now I don’t get any further with the Activity CSS. It works on the activity page & on the profile page too. But I can’t do that on the group page

    for this project I use the “Custom CSS & JS” plugin.

    I use the conditionals tags “bp_is_activity_compnent” & “bp_is_group_activity” for the activity CSS classes, but unfortunately it doesn’t work in the group

    Do you have a solution for me?

    best wishes

    doctrpnyc
    Participant

    Hello. i am using the below code to display new jobs added to the activity field. i want to display the job post title in the feed but it shows as just job. i am using the following code

    bp_activity_set_post_type_tracking_args( ‘job_listing’, array(
    ‘component_id’ => ‘activity’,
    ‘action_id’ => ‘new_job_listing’,
    ‘bp_activity_admin_filter’ => __( ‘admin Jobs’, ‘custom-domain’ ),
    ‘bp_activity_front_filter’ => __( ‘Jobs’, ‘custom-domain’ ),
    ‘contexts’ => array( ‘activity’, ‘member’ ),
    ‘bp_activity_new_post’ => __( ‘%1$s posted a new work opportunity Job‘, ‘drallys’ ),
    ‘bp_activity_new_post_ms’ => __( ‘%1$s posted a new work opportunity Job, on the site %3$s’, ‘drallys’ ),
    ‘position’ => 100,
    ) );
    }
    add_action( ‘init’, ‘customize_page_tracking_args’, 1000 );

    function monkey1980_include_post_type_title( $action, $activity ) {
    if ( empty( $activity->id ) ) {
    return $action;
    }

    if ( ‘new_job_listing’ != $activity->type ) {
    return $action;
    }

    preg_match_all( ‘/<a.*?>([^>]*)<\/a>/’, $activity->action, $matches );

    if ( empty( $matches[1][1] ) || ‘Job’ != $matches[1][1] ) {
    return $action;
    }

    $post_type_title = bp_activity_get_meta( $activity->id, ‘post_title’ );

    if ( empty( $post_type_title ) ) {
    switch_to_blog( $activity->item_id );

    $post_type_title = get_post_field( ‘post_title’, $activity->secondary_item_id );

    // We have a title save it in activity meta to avoid switching blogs too much
    if ( ! empty( $post_type_title ) ) {
    bp_activity_update_meta( $activity->id, ‘post_title’, $post_type_title );
    }

    restore_current_blog();
    }

    return str_replace( $matches[1][1], esc_html( $post_type_title ), $activity->action );
    }
    add_filter( ‘bp_activity_custom_post_type_post_action’, ‘monkey1980_include_post_type_title’, 10, 2 );

    #318240

    In reply to: Auto Refresh

    songdove
    Participant

    On the sitewide activity, I see “load newest”, but on the profile activity, or on whatever the page is that loads when you click to see a full conversation, or view a notification of someone’s comment, “undefined(1)” not only shows, but starts incrementing endlessly till you click it or leave the page. And don’t tell me to change the theme, I’ve tried a dozen themes now at least to get every piece working I need for my buddypress puzzle, this should work no matter what the theme is. If there IS a particular css call being messed up, what is it so I can add it to the customizer Additional CSS area?

    dmcat
    Participant

    Hi there!

    I’m sure this is bit of a crazy ask, but here it goes anyway…

    I’ve been reviewing the code for custom activity posts. Though I’m far from being an expert it seems fairly straight forward. However I’m not quite sure how to pass the data that I want to be in the content of the post.

    On my site users can donate money to good causes. I would like a post to be created whenever a user does this. All donations take place via subdomain (payments.mydomain.co), after completing donation via stripe they are redirected to a success page in that subdomain, which has a link back to the site.

    Firstly, is it possible to generate a post from an action that took place outside of buddypress (and is not a plugin)?

    Secondly if yes, how can you make it work? I can’t seem to quite work it out because I can get it to trigger any actions/filters required for custom posts since it lies outside of buyddpress.

    vincenzon617
    Participant

    Hi there,
    I am not sure if this has already been answered so apologies if it has (I cannot find an answer). What i would like to do is remove some of the icons and menus from my BuddyPress profile page. Currently I have 6 buttons on the profile (‘Profile’,’Activity’,’Notifications’,’Friends’,’Forums’,’Settings’). These have sub menus as well, for example if I choose ‘Profile’, its submenus are ‘Home’, ‘View’, ‘Change Profile Picture’.
    What I would like to do is remove everything but ‘Friends’, ‘Forums’ and ‘Settings’. Then I would like only “replies created” to be shown when the user clicks on the ‘Forums’ button. I am currently using bbPress within my site for the forums if that helps (I would add an image but I am having trouble doing so).
    If anyone could help me with this or point me in the right direction to achieve what I would like that would be great!
    Many thanks.

    homelesshenry
    Participant

    I’ve followed the guide at:

    Post Types Activities

    And I’ve made woocommerce products appear in the activity stream via the code below:

    <?php
    
    add_post_type_support( 'product', 'buddypress-activity' );
     
    function customize_page_tracking_args() {
        // Check if the Activity component is active before using it.
        if ( ! bp_is_active( 'activity' ) ) {
            return;
        }
     
        bp_activity_set_post_type_tracking_args( 'product', array(
            'component_id'             => buddypress()->blogs->id,
            'action_id'                => 'new_product_page',
            'bp_activity_admin_filter' => __( 'Published a new product', 'custom-domain' ),
            'bp_activity_front_filter' => __( 'Pages', 'custom-domain' ),
            'contexts'                 => array( 'activity', 'member' ),
            'activity_comment'         => true,
            'bp_activity_new_post'     => __( '%1$s posted a new <a href="%2$s">product</a>', 'custom-textdomain' ),
            'bp_activity_new_post_ms'  => __( '%1$s posted a new <a href="%2$s">product</a>, on the site %3$s', 'custom-textdomain' ),
            'position'                 => 100,
        ) );
    }
    add_action( 'bp_init', 'customize_page_tracking_args' );
    
    ?>

    What I’m trying to do is make it so the Product Post Title appears hyperlinked instead of a static word (in this case, “Product”):

    'bp_activity_new_post' => __( '%1$s posted a new <a href="%2$s">product</a>', 'custom-textdomain' ),

    I don’t know PHP, so I thought I might be able to just jam something similar I’ve found to replace that line of code, such as:

    sprintf( __( '%1$s created a new Product post, %2$s', 'buddypress' ), bp_core_get_userlink( (int) $post->post_author ), '' . $post->post_title . '' );

    Unfortunately, that doesn’t work.

    ozoceyelemeze
    Participant

    I am using a customize theme. I don’t have any custom functions in bp-custom.php. Yes I know forum support is limited where third party themes are concerned but I can’t fix it.

    here is my buddypress activity page https://www.upsozluk.com/etkinlik/
    How can I fix the gap? There is no problem in mobile version of my website, but only computers have this space problem. i am using the latest version of wordpress

    Thanks!!

    #316736
    lynnapp
    Participant

    Hi, I have a site with no functions. the only plugin activated is buddy press,

    so when it loads the object for the nav after the bp-wrap div it has

    <nav class=”main-navs no-ajax bp-navs single-screen-navs horizontal users-nav” id=”object-nav” role=”navigation” aria-label=”Member menu”>

    I had the site with custom themes and functions and removed everything to try and find out where it was getting hung up.

    Is there something else I can trouble shoot this with to find out why it does not load with Ajax – I thought that should be the default

    WP is 5.6
    Theme twenty twenty-one 1.1
    php 7.4
    Buddy Press info Version 7.1.0
    Active components Community Members, Extended Profiles, Account Settings, Friend Connections, Private Messaging, Activity Streams, Notifications, User Groups
    Active template pack BuddyPress Nouveau 7.1.0 ( I have tried with bp legacy also )
    Toolbar No
    Account Deletion Yes
    Community Members: Profile Photo Uploads Yes
    Community Members: Cover Image Uploads Yes
    Extended Profiles: Profile Syncing Yes
    User Groups: Group Creation Yes
    User Groups: Group Photo Uploads Yes
    User Groups: Group Cover Image Uploads Yes
    Activity Streams: Post Comments Yes
    Activity Streams: Activity auto-refresh Yes

    #316135
    haitianguy
    Participant

    Hi, i feel like im doing this properly but i never get the right result. i have a custom meta called “featured” in activity meta. For testing purposes the meta values are 1,2,3,4 my goal is to have an activity loop order activities by the meta value. i’ve checked the documentation and i came up with this.

    
    <?php
    
    get_header(); ?>
    
    <?php get_template_part('page-parts/general-title-section'); ?>
    
    <?php get_template_part('page-parts/general-before-wrap');
    
    $atts =  array(
    			'title'            => 'Latest Activity',// title of the section.
    			'pagination'       => 1,// show or not.
    			'load_more'        => 0,
    			'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.
    			'count_total'      => true,
    
    			// 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(),
    			'allow_posting'    => false,    // experimental, some of the themes may not support it.
    			'container_class'  => 'activity',// default container,
    			'hide_on_activity' => 1,// hide on user and group activity pages.
    			'for'              => '', // 'logged','displayed','author'.
    			'role'             => '', // use one or more role here(e.g administrator,editor etc).
                'for_group'        => '',// group slug.
    		);
    
    		$atts['meta_query']= array(
                                        array(
                                            'key' => 'featured',
                                            'value' => '0',
                                            'type' => 'numeric',
                                            'compare' => '!=',
                                            ),
                                            'meta_type' => 'numeric',
                                    'orderby' => 'meta_value_num',
                                    'meta_key' => 'featured',
                                    'order' => 'DESC'
                                    );
    
     ?>
    			<div id="buddypress">
    	
    
    		<?php do_action( 'bp_before_activity_loop' ); 
    		
    		
    		
    	
    
    if ( bp_has_activities( $atts ) ) : ?>
    
                <div class="<?php echo esc_attr( $atts['container_class'] ); ?> 
                <?php if ( ! $atts['display_comments'] ) : ?> hide-activity-comments<?php endif; ?>">
    
                    <ul id="activity-stream" class="activity-list item-list">
    
    					<?php while ( bp_activities() ) : bp_the_activity(); ?>
    						
    						<?php bp_get_template_part( 'buddypress/activity/entry' ); ?>
    					<?php endwhile; ?>
    
    					<?php if ( $atts['load_more'] && bp_activity_has_more_items() ) : ?>
                            <li class="load-more">
                                <a href="<?php bp_activity_load_more_link() ?>"><?php _e( 'Load More', 'buddypress' ); ?></a>
                            </li>
    					<?php endif; ?>
                    </ul>
    
    				<?php if ( $atts['pagination'] && ! $atts['load_more'] ) : ?>
                        <div class="pagination">
                            <div class="pag-count"><?php bp_activity_pagination_count(); ?></div>
                            <div class="pagination-links"><?php bp_activity_pagination_links(); ?></div>
                        </div>
    				<?php endif; ?>
    
                </div> 
    
            <?php else : ?>
                <div id="message" class="info">
                    <p><?php _e( 'Sorry, there was no activity found. Please try a different filter.', 'buddypress' ); ?></p>
                </div>
            <?php endif; ?>
            
    ?>
    			</div>
    		
    
    		<?php do_action( 'bp_after_activity_loop' ); ?>
    
    <?php get_template_part('page-parts/general-after-wrap'); ?>
    
    <?php get_footer(); ?>
    

    everything here works except for the order. for some reason it always orders by activity ID. am i missing something here? Thanks in advance im going crazy with this.

    #316125
    jshawpro
    Participant

    Hi.
    I’m having an issue with Groups that causes the activity to show “Load More” instead of showing latest group updates/posts. Filters also do not work for me on group activity stream.

    I have it setup to show the groups Activity feed by default instead of a homepage for the group.

    If set a homepage for the group and then navigate to ‘Activity’ everything works as it should.
    Filters work. However, my requirement is to have latest posts load first by default.

    I’m using Buddypress Nouveau on a custom WordPress theme based on Underscores.

    Any insight or troubleshooting ideas would be greatly appreciated!

    All the best,
    Justin

    Antipole
    Participant

    On my site, I regularly get attempts to log in with user name admin. Presumably, bots trying it on. I have no use name admin for that reason.

    Recently, there are malicious attempts about every minute to log on using actual user names. They get locked out after three tries but I cannot be sure some users have guessable passwords, although I try to prevent that when a password is changed.

    I guess the user names are leaking through the public version of the members’ directory. You can see that here. This public page contains links in the avatar and user handle which contain the member’s user name. I want to retain this publically-viewable directory but need to remove the links when the visitor is not logged on.

    I have my own custom plugin that hooks onto ‘bp_directory_members_item’ and which displays the summary data you can see. Logged-in members see more detail than public visitors.

    I am looking for a way to filter the avatar and displayed name in which I could remove the links to the member’s profile and just display the image and the display name as text, thus hiding the member’s user name.

    Some users have their recent activity displayed and this has a view link to the activity. Although this link is anonymous, if it is followed, it also gives away the user name. Simplest would be to remove the View link for non-logged-in members.

    Any pointers or advice will be gratefully received.

    WP v5.5.3
    BP v6.3.0

    #315814
    jpderboghossian
    Participant

    Hello,
    I installed BP on my site and it was working well. But now, the “standard member front page” is gone. The page where you have your menu items: activity, messages, notifications, friends, groups, etc. What I mean by “standard member front page” is this:

    Example Profile Page

    I don’t understand how this page can disappear. Now when you login the website defaults to a “you’re now logged in as X” page. And if you navigate to the member directory and click on your profile, there is just a list of your friends and groups. No activity, no messages, no notifications tabs.

    In addition to BP, I’m using the Profile Builder plugin, and Profile Builder Customization Toolbox. In the Appearance> customization > BuddyPress nouveau settings, I have selected the enable default front page for member profiles. I also have selected the display the biographical info from the member’s WordPress profile.

    WP version:5.5.3
    BP version: 6.4.0
    Theme: Werkstatt
    website: queerarmenianlibrary.com

    #315685
    highaltitudearcher
    Participant

    Yes yes yes yes … I’ve seen that page. It’s not very descriptive.

    In this 3rd party theme I have, I’ve noticed to support woocoomerce they’ve added the following in page.php in the main template directory:

    
    <?php while (have_posts()) : the_post(); ?>
        <?php if(is_cart() || is_checkout() || is_account_page() || is_wc_endpoint_url()) : ?>
            <?php get_template_part('templates/page', 'woocommerce'); ?>
        <?php endif; ?>
        <?php get_template_part('modules/module', 'loop'); ?>
    <?php endwhile; ?>
    

    So you can see that they’re directing WP to load the WC templates when it’s a WC page type, and to their custom block editor template if it’s not.

    Is there something similar so that I could add the get_template_part() function for the BP page types (e.g. is_members() or is_activity()…)?

    haitianguy
    Participant

    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

    #315499
    mkbond
    Participant

    Does anyone know how to incorporate replying to BuddyPress discussions within the activity feed? We are using the BuddyBoss platform and BuddyBoss custom theme.

    We are trying to be a mainly forum/discussion-based site and we don’t use WP comments. So I want to have users be able to just click a “Reply” button in the activity feed to reply right there, versus being redirected to a new page (similar to Facebook’s reply/comments but for discussions).

    We don’t modify the core files, only modify through child theme. We are also running bbPress through BuddyBoss. We have GoDaddy hosting with a LAMP managed server setup.

    WordPress v5.5.3
    BuddyBoss Platform v1.5.3
    BuddyBoss Theme 1.6.0

    #315426
    corsky
    Participant

    Hi

    I’m using buddypress with BP-Nouveau and I’ve noticed that when I disable the custom front page for groups, the search function in the directory is not working, while is working if the custom front page is enabled. It is a bug? or there is another way to make it to work?
    I’ ve disabled all the plugins and I have no custom code, but kept BP-Nouvau and ocean wp theme and still it does not work. Unfortunately the only difference is that the “enabled/disabled custom front pages for groups” determines whether the search works or not.
    When I inspect the “search” in the activity group page the references are different dipending on the enabling of the Custom front pages for groups.
    Here is a link that shows which search buttons do not work : https://www.x-simili.it/booking/

    Thank you so much
    Corrado

Viewing 25 results - 51 through 75 (of 831 total)
Skip to toolbar