-
Author
-
January 12, 2014 at 14:04 #9576frien337Participant
Hello Seventh Theme,
Can you let me know where the bit of code is that generates the match number? I would like to add the % symbol next to the number 🙂
Thanks,
RyanJanuary 14, 2014 at 10:29 #9685AbeKeymasterHi, Function is named kleo_bp_compatibility_match and is found in wp-content\themes\sweetdate\custom_buddypress\bp-functions.php
you can copy it to sweetdate-child/functions.php and modify it there to change default behaviour
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer.January 15, 2014 at 17:15 #9767pmitParticipantThanks for the answer. Where do you Copy and paste this file to the sweetdate child theme? sorry dont understand.
Thanks
January 15, 2014 at 19:06 #9769frien337ParticipantI could be wrong, but I don’t think you can add the bp-functions.php file to a child theme. Instead, you should add the changes to your functions.php file in your child theme. I wanted to add the percentage sign next to the number in the match and this is what I added to my functions.php file in the child theme:
/* PROFILE PAGE MATCH FEATURE - ADD PERCENTAGE */
function kleo_bp_compatibility_match()
{
global $bp;
if ( is_user_logged_in() && !bp_is_my_profile() ):
echo '<div class="circular-item" title="'.__("Compatibility match", 'kleo_framework').'">';
echo '<small class="icon strong">Match</small>';
echo '<span class="greenCircle">' . compatibility_score($bp->loggedin_user->id,bp_displayed_user_id()) . '%</span>';
echo '<span class="hearts"></span>';
echo '</div>';
endif;
}
I had to edit the css to re-align the number in the match circle. Add this to your style.css file in your child theme:
.greenCircle {
margin-top:27px !important;
}
There is probably a better way to do this, however, I had to settle on doing it this way because I am not good with PHP.
January 16, 2014 at 20:42 #9827AbeKeymasterHi, You can put the bp-functions.php in the child theme if you want but if you make small changes it is better to take only that function
Hi there!!! Help others from the community and mark any reply as solution if it solved your question. Mark as a solution---
@ SeventhQueen we do our best to have super happy customers. Thanks for being our customer. -
AuthorPosts
The forum ‘Sweetdate – WordPress’ is closed to new topics and replies.