WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. koreancandy
    Member
    Posted 9 months 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 9 months ago #

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

  3. koreancandy
    Member
    Posted 9 months ago #

    Yep it is

  4. Michael Beckwith
    Member
    Plugin Author

    Posted 9 months 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 9 months ago #

    Thanks

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

    Thank you!

  6. Michael Beckwith
    Member
    Plugin Author

    Posted 9 months 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 9 months 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 9 months 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.

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.