This topic has 2 replies, 2 voices, and was last updated 8 years by markin079.

  • Author
  • #178167
     markin079
    Participant

    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

    #178199
     Kieran_SQ
    Moderator
    Not marked as solution
    #178283
     markin079
    Participant
    Not marked as solution
Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.

Log in with your credentials

Forgot your details?