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 https://mydomain.com/members/<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(); ?>"> <?php 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' ); ?> </a> <?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' ); ?>
Thanks.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Displaying Achievements As Icons In Member Profile Header’ is closed to new replies.