Good evening, I’m trying to put the “add to favorites” button in the “single” file of the Kleo theme, I copied the “single” file into the kleo-child, I added the code:
<div class=”activity-meta”>
<?php if ( is_user_logged_in() ) : ?>
<?php if ( bp_activity_can_favorite() ) : ?>
<?php if ( !bp_get_activity_is_favorite() ) : ?>
<a href=”<?php bp_activity_favorite_link(); ?>” class=”button fav bp-secondary-action” title=”<?php esc_attr_e( ‘Mark as Favorite’, ‘buddypress’ ); ?>”>aggiungi alla wishlist<?php //_e( ‘Favorite’, ‘buddypress’ ); ?></a>
<?php else : ?>
<a href=”<?php bp_activity_unfavorite_link(); ?>” class=”button unfav bp-secondary-action” title=”<?php esc_attr_e( ‘Remove Favorite’, ‘buddypress’ ); ?>”>rimuovi dalla wishlist<?php //_e( ‘Remove Favorite’, ‘buddypress’ ); ?></a>
<?php endif; ?>
<?php endif; ?>
<?php endif; ?>
</div>
but it does not work, I would like to know if there is a code string that can be used to insert the “add to favorites” option on certain parts of the site; in my case it would also fit in the “single” file; thank you for your availability and I apologize for my English.
Good evening.
Marco