Group Mods

  • Profile picture of r-a-y
  • Profile picture of Hugo
  • Profile picture of @mercime

Support: Miscellaneous

Everything else.

Remove Favorite button (9 posts)

Started 1 year, 8 months ago by: Carlos Faria

  • Profile picture of Carlos Faria Carlos Faria said 1 year, 8 months ago:

    Hi,

    I wonder how do I completely remove the “Favorite” button on my BuddyPress.

    http://img18.imageshack.us/img18/5390/catspzn.jpg

    Thanks

  • Profile picture of Carlos Faria Carlos Faria said 1 year, 8 months ago:

    Anyone?

  • Profile picture of techguy techguy said 1 year, 8 months ago:

    Look in your theme files and remove the reference to it. In a child theme it’s probably somewhere in the activity folder.

  • Profile picture of footybible footybible said 1 year, 8 months ago:

    Can anyone direct what code needs to be stripped out to remove the ‘favorite’ functionality? I think this would be a really useful guide to have. Thanks

  • Profile picture of Paul Gibbs Paul Gibbs said 1 year, 8 months ago:

    As @crashutah said, in your child theme, override activity/entry.php and remove the appropriate line.

  • Profile picture of footybible footybible said 1 year, 8 months ago:

    Hi @DJPaul

    I removed the following line from entry.php

    <a href="” class=”fav” title=”">

    <a href="” class=”unfav” title=”">

    This has removed the button from the activity stream but the tab on user profiles is still there? Cheers

  • Profile picture of guigoz guigoz said 1 year, 7 months ago:

    Hi,

    Is anyone knows how to remove “Favorite” tab on profile activity and general activity tab + menu in adminbar ?

    Thanks

  • Profile picture of acaps2007 acaps2007 said 1 year, 4 months ago:

    I’d like help with this one too… any ideas?

    I just removed this code from entry.php and the “favorite” option is still next to each post… Shouldn’t it be gone?

    <?php if ( is_user_logged_in() ) : ?>
    				<?php if ( !bp_get_activity_is_favorite() ) : ?>
    					<a href="<?php bp_activity_favorite_link() ?>" class="fav" title="<?php _e( 'Mark as Favorite', 'buddypress' ) ?>"><?php _e( 'Favorite', 'buddypress' ) ?></a>
    				<?php else : ?>
    					<a href="<?php bp_activity_unfavorite_link() ?>" class="unfav" title="<?php _e( 'Remove Favorite', 'buddypress' ) ?>"><?php _e( 'Remove Favorite', 'buddypress' ) ?></a>
    				<?php endif; ?>
    			<?php endif;?>
  • Profile picture of acaps2007 acaps2007 said 1 year, 4 months ago:

    Edit. I just removed the following code from ajax.php and the “favorite” button is still there. Why won’t it die?

    break;
    		case 'favorites':
    			$feed_url = $bp->loggedin_user->domain . BP_ACTIVITY_SLUG . '/favorites/feed/';
    * AJAX mark an activity as a favorite */
    function bp_dtheme_mark_activity_favorite() {
    	global $bp;
    
    	bp_activity_add_user_favorite( $_POST['id'] );
    	_e( 'Remove Favorite', 'buddypress' );
    }
    add_action( 'wp_ajax_activity_mark_fav', 'bp_dtheme_mark_activity_favorite' );
    
    /* AJAX mark an activity as not a favorite */
    function bp_dtheme_unmark_activity_favorite() {
    	global $bp;
    
    	bp_activity_remove_user_favorite( $_POST['id'] );
    	_e( 'Favorite', 'buddypress' );
    }
    add_action( 'wp_ajax_activity_mark_unfav', 'bp_dtheme_unmark_activity_favorite' );