She Makes Webthings

Having trouble getting myCRED to work as described in the documentation? Open a support ticket! Issues or bug reports posted in the forums will be deleted. Helping out other members or answering questions will get you free Tokens that you can use as payment in the store.

Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • in reply to: Adding text after my cred badges #50109
    AvatarShe Makes Webthings

    If anyone needs help with this. The correct code is as follows:

    function add_content_after_mycred_users_badges( $user_id, $users_badges ) {
    	echo "<div>Your Text Here</div>";
    }
    add_action( 'mycred_after_users_badges', 'add_content_after_mycred_users_badges', 10, 2 );
    in reply to: Adding text after my cred badges #49648
    AvatarShe Makes Webthings

    As I mentioned, I don’t know php so I appreciate you taking the time to explain the $html and return function. But this snippet adds text after every badge. I am just trying to add text after the badge ‘row’ on the users profile. Can this be done or do I need to use CSS to achieve that? Thank you.

    in reply to: Adding text after my cred badges #49156
    AvatarShe Makes Webthings

    Sorry I have a ticket open for this as well. I’m not sure why I’m not getting notifications from the support forum…

    Thank you for your response…but I honestly don’t understand. The snippet provided in your link is too complicated for someone who isn’t very familiar with coding in php. I am seeking support to add HTML after the badges, but am only getting clues that don’t really help. Thanks anyway.

    in reply to: Adding text after my cred badges #48676
    AvatarShe Makes Webthings

    Do you think you can share another example? I can’t seem to figure it out. If I edit the snippet, the badges all disappear:

    function mycred_text ( $html, $image, $badge_object ) {
    echo '' ;
    }
    
    add_filter( 'mycred_badge_image', 'mycred_text', 10, 3 );
Viewing 4 posts - 1 through 4 (of 4 total)
11