Title: Compact Display?
Last modified: August 21, 2016

---

# Compact Display?

 *  Resolved [allmyleagues](https://wordpress.org/support/users/allmyleagues/)
 * (@allmyleagues)
 * [13 years ago](https://wordpress.org/support/topic/compact-display/)
 * I absolutely love this plugin!! Is there any way of compacting the badges, like
   they are done here?
 * [https://credly.com/u/1133](https://credly.com/u/1133)
 * That feature alone would be incredible!! Thanks guys for making such a great 
   plugin!
 * Mark
 * [http://wordpress.org/extend/plugins/badgeos/](http://wordpress.org/extend/plugins/badgeos/)

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/compact-display/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/compact-display/page/2/?output_format=md)

 *  [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [13 years ago](https://wordpress.org/support/topic/compact-display/#post-3794499)
 * So you’re wanting just a basic listing of earned badges?
 *  Thread Starter [allmyleagues](https://wordpress.org/support/users/allmyleagues/)
 * (@allmyleagues)
 * [13 years ago](https://wordpress.org/support/topic/compact-display/#post-3794501)
 * Yessir!
 * Right now, the standard display really only allows 3-4 achievements to be displayed
   without scrolling. If badges can be displayed side by side (both horizontally
   and vertically) then a site could display 20-30 badges in the same screen length.
   I see tremendous value in a feature like that.
 *  [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [13 years ago](https://wordpress.org/support/topic/compact-display/#post-3794552)
 * If you know how to use the wp_query class at all, you could roll your own solution
   with this. The badges are simply custom post types. This way you could query 
   for however many you wanted at a time and display them however you wanted. Hope
   that helps put you on your way, but if you’re completely lost, let me know and
   I can try to help some more.
 *  Thread Starter [allmyleagues](https://wordpress.org/support/users/allmyleagues/)
 * (@allmyleagues)
 * [13 years ago](https://wordpress.org/support/topic/compact-display/#post-3794566)
 * I feel bad to say I am not good at coding. In your estimation, how difficult 
   would this be to implement? Like say if it took a half hour to code, I’d be willing
   to donate 20 bucks to you, and then everyone can benefit from the compact display!
   If it’s a more daunting task than a half hour then perhaps I’ll tackle this myself
   once I’ve learned more about how WordPress coding works.
 * Thanks for the timely responses! I really enjoy this plugin.
 * Mark
 *  [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [13 years ago](https://wordpress.org/support/topic/compact-display/#post-3794574)
 * So that I know what I’m helping with, is this a list of badges available? or 
   a list that a certain user has earned? or perhaps ones they have given to others?
 *  Thread Starter [allmyleagues](https://wordpress.org/support/users/allmyleagues/)
 * (@allmyleagues)
 * [13 years ago](https://wordpress.org/support/topic/compact-display/#post-3794576)
 * It would be for both the list of badges available and also the profile display
   for the ones each user has earned. Basically, my badges are quite self-explanatory,
   as you can see here:
 * [http://allmyleagues.com/home/aml-achievements-update/](http://allmyleagues.com/home/aml-achievements-update/)
 * If the banners could be displayed in a compact manner like that (but dynamically,
   of course), it would look quite sharp on my site!
 *  Thread Starter [allmyleagues](https://wordpress.org/support/users/allmyleagues/)
 * (@allmyleagues)
 * [13 years ago](https://wordpress.org/support/topic/compact-display/#post-3794577)
 * If I had to pick one, I would request that the display of all badges available
   was compacted first, and the personal badges was compacted if you had the time.
 *  [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [13 years ago](https://wordpress.org/support/topic/compact-display/#post-3794581)
 * How much of those badges are hardcoded into the badge image? What parts are something
   like post content/title/etc ? I assume at least the center part + the year spans
   aren’t going to be part of the badge image.
 *  Thread Starter [allmyleagues](https://wordpress.org/support/users/allmyleagues/)
 * (@allmyleagues)
 * [13 years ago](https://wordpress.org/support/topic/compact-display/#post-3794586)
 * It’s all hardcoded. I have automated processes set up on my computer that spit
   out the awards.
 *  [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [13 years ago](https://wordpress.org/support/topic/compact-display/#post-3794587)
 * Not in terms of awarding, in terms of the actual display of the badge. Trying
   to separate out the content.
 * For example. the image part would be the Green shield and “Football Standard 
   Dynasty” at the top, and the rest of the text wouldn’t be there. The name of 
   the badge, that shows up in the title field, isn’t in the image, and would need
   to be overlayed, as well as the years that are associated with the badge somehow.
   Post meta for example.
 * To query for the badges with that setup, I’d need to grab the badge image, located
   in WP’s featured image spot, the badge title, and the badge meta.
 * Chances are in this case, i’d use the badge image as an inline css style for 
   a background image, then echo the title/meta inside the div that the image is
   a background for.
 *  Thread Starter [allmyleagues](https://wordpress.org/support/users/allmyleagues/)
 * (@allmyleagues)
 * [13 years ago](https://wordpress.org/support/topic/compact-display/#post-3794589)
 * Hm ok, I think I understand you now. Let’s see if I do 🙂
 * The post titles for all the banners would be Year,Sport,League,Placement.
 * Examples of post titles:
 * 2012-2013 Football Standard Dynasty – 1st Place
    2012 Baseball Standard Dynasty–
   3rd Place 2011-2012 Hockey Invitational League – 2nd Place
 * Does that help, or am I still not understanding?
 *  [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [13 years ago](https://wordpress.org/support/topic/compact-display/#post-3794618)
 * Sorry for the delay in replying. The layout I assume you want on the badge would
   be possible easy enough if you separated the year, sport, league and placement
   by commas in the title field.
 * 2012-2013, Football, Standard Dynasty, 1st Place
 * Then we could use the php explode function to get each comma-separated area into
   individual pieces. If you can stay consistent in the order that they’re listed,
   then we can also make the badges really easy to do too.
 * Ok, here’s what I have, at least for a first round before any noticed refinement
   is needed. I provided comments in places I think would need them, but ask questions
   as you get them. This one is going to query for all available badges and loop
   them with display.
 *     ```
       <?php
   
       $args = array(
       	'post_type' => 'badges',
       	'posts_per_page' => -1
       );
       $badges = new WP_Query( $args );
   
       if( $badges->have_posts() ) : while( $badges->have_posts() ) : $badges->the_post();
   
       	//set up our variables.
       	$parts = explode(',', get_the_title() );
       	//assign each part to an individual variable for easier reference
       	$year = $parts[0]; $sport = $parts[1];
       	$league = $parts[2]; $placement = $parts[3];
   
       	//grab just the URL for the featured image, assign to an individual variable.
       	$imgsrc = wp_get_attachment_image_src( get_post_thumbnail_id( get_the_ID ), "Full");
       	$badgeimg = $imgsrc[0];
       	?>
       	<?php //Start our output of the badge, assigning the badge image to a css background, inline. ?>
       	<div class="amlbadge" style="background: url('<?php echo $badgeimg; ?>') no-repeat;">
       	<p><?php echo $sport; ?>
       		<?php echo $league; ?></p>
   
       	<p><?php echo $placement; ?></p>
   
       	<p><?php echo $year; ?></p>
       	</div>
   
       <?php endwhile;
       wp_reset_postdata();
       endif;
       ?>
       ```
   
 *  [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [13 years ago](https://wordpress.org/support/topic/compact-display/#post-3794662)
 * Hey allmyleagues, any luck with this, if you had the chance to give it a go?
 *  [TheBigAdmin1](https://wordpress.org/support/users/thebigadmin1/)
 * (@thebigadmin1)
 * [12 years, 12 months ago](https://wordpress.org/support/topic/compact-display/#post-3794664)
 * Michael, I am also looking for a solution to display a list of individual user
   badges within their buddpress and standard profile. I am one of the site admins
   at [http://SportsUnbiased.com](http://SportsUnbiased.com) and we could really
   use some help.
 *  [Michael Beckwith](https://wordpress.org/support/users/tw2113/)
 * (@tw2113)
 * The BenchPresser
 * [12 years, 12 months ago](https://wordpress.org/support/topic/compact-display/#post-3794665)
 * TheBigAdmin1, it sounds like your request is more for individual user earned 
   badges while this thread is more listing all available ones in a “compact” way.
   If you could start your own thread, I’d gladly help there. Please include all
   details you can for what you’re looking for with it.

Viewing 15 replies - 1 through 15 (of 16 total)

1 [2](https://wordpress.org/support/topic/compact-display/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/compact-display/page/2/?output_format=md)

The topic ‘Compact Display?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/badgeos_85d3bc.svg)
 * [BadgeOS](https://wordpress.org/plugins/badgeos/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/badgeos/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/badgeos/)
 * [Active Topics](https://wordpress.org/support/plugin/badgeos/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/badgeos/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/badgeos/reviews/)

 * 16 replies
 * 3 participants
 * Last reply from: [TheBigAdmin1](https://wordpress.org/support/users/thebigadmin1/)
 * Last activity: [12 years, 12 months ago](https://wordpress.org/support/topic/compact-display/page/2/#post-3794666)
 * Status: resolved