WordPress.org

Ready to get started?Download WordPress

Forums

Achievements for WordPress
Displaying Achievements As Icons In Member Profile Header (2 posts)

  1. Unit9
    Member
    Posted 1 year ago #

    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 http://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.

    http://wordpress.org/plugins/achievements/

  2. Paul Gibbs
    BuddyPress Lead Developer
    Plugin Author

    Posted 12 months ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic