Support » Plugin: Achievements for WordPress » Displaying Achievements As Icons In Member Profile Header

  • Hi guys,

    I’m trying to display the achievements as icons in the header of the member’s profile, next to their names.

    This code does work, but only if you’re on the<username>/achievements/ page and not when you’re on any of the other profile pages. So it’s showing the correct achievements on that page, but disappears on all of the other profile pages.

    There must be something I’m missing that identifies the specific user/member on the other profile pages?

    <?php do_action( 'dpa_template_before_author_achievements' ); ?>
    	<?php if ( dpa_has_progress() && ! empty( achievements()->achievement_query->posts ) ) : ?>
    	<?php do_action( 'dpa_template_after_achievements_index' ); ?>
        <?php do_action( 'dpa_template_before_achievements_loop_block' ); ?>
    		<?php do_action( 'dpa_template_before_achievements_loop' ); ?>
    		<?php while ( dpa_achievements() ) : dpa_the_achievement(); ?>
    			<?php do_action( 'dpa_template_in_achievements_loop_early' ); ?>
                        <?php do_action( 'dpa_template_before_achievement_name' ); ?>
                        <a href="<?php dpa_achievement_permalink(); ?>">
                                if ( has_post_thumbnail( $notification->ID ) )
                                    echo get_the_post_thumbnail( $notification->ID, 'thumbnail', array( 'class' => 'attachment-medium dpa-achievement-unlocked-thumbnail' ) );
                        <?php do_action( 'dpa_template_after_achievement_name' ); ?>
                    <?php do_action( 'dpa_template_in_achievements_loop_late' ); ?>
    		<?php endwhile; ?>
    		<?php do_action( 'dpa_template_after_achievements_loop' ); ?>
    <?php do_action( 'dpa_template_after_achievements_loop_block' ); ?>
    <?php endif; ?>
    	<?php do_action( 'dpa_template_after_author_achievements' ); ?>


Viewing 1 replies (of 1 total)
  • Plugin Author Paul Gibbs


    BuddyPress Lead Developer

    I don’t know what’s going on here, but I will note there was a bug fixed in this template recently which will be out in version 3.4 (out soon) so you’ll want to update the code then.

Viewing 1 replies (of 1 total)
  • The topic ‘Displaying Achievements As Icons In Member Profile Header’ is closed to new replies.