WordPress.org

Forums

BadgeOS Community Add-on
[resolved] Is it possible to make the badges unlinked? (8 posts)

  1. koreancandy
    Member
    Posted 1 year ago #

    Hi,

    I'm really not sure how to correctly word this so it makes sense, but is there a way that the badges under the achievements on a user's profile aren't linked to the badge post?

    For example, this user has earned the 'commentator' badge: http://www.korean-courses.com/members/sammie/achievements/

    Is it possible to show the badge without it linking to the badge page: http://www.korean-courses.com/badges/commentator/

    The only reason is because it simply doesn't display properly.

    Thank you very much

    http://wordpress.org/plugins/badgeos-community-add-on/

  2. Michael Beckwith
    Member
    Plugin Author

    Posted 1 year ago #

    This is in the achievements section of a buddypress user profile, correct?

  3. koreancandy
    Member
    Posted 1 year ago #

    Yep it is

  4. Michael Beckwith
    Member
    Plugin Author

    Posted 1 year ago #

    Not sure how familiar you are with the hooks system, but it looks like the best you'll get for this, at the moment at least, is the following hook

    apply_filters( 'badgeos_render_achievement', $output, $achievement->ID );

    The $output variable is going to hold ALL of the output for the individual achievement, and the $achievement->ID part is the ID of the currently rendered achievement. You'll need to do some str_replace, or similar function, on the $output to remove the tags.

    If you need some help with filtering this, let me know, and I'll do what I can to help.

  5. koreancandy
    Member
    Posted 1 year ago #

    Thanks

    I'm not sure where to put this, could you help me please?

    Thank you!

  6. Michael Beckwith
    Member
    Plugin Author

    Posted 1 year ago #

    The resulting code will go into your functions.php, but we can't use the 1 line snippet above, that was just an example of the hook being used and what content is available.

    We still need to craft the hook to handle the removing of your links. What's the achievement slug for the one you want to remove links on?

  7. koreancandy
    Member
    Posted 1 year ago #

    Ah, that makes sense, thanks :)

    I wanted to make all of the badges removed links. Will this be impossible?

    Thanks!

  8. Michael Beckwith
    Member
    Plugin Author

    Posted 1 year ago #

    Not impossible, though not necessarily simple either. There are many ways that the output is generated and it's a case of finding/altering each one.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.