Support » Plugin: Achievements for WordPress » Image size for achievements loop

  • Resolved retronerd

    (@retronerd)


    Hi, I used the following code to add achievement images into the loop PHP

    <thead>
    		<tr>
    
    			<th id="dpa-archive-achievements-image" scope="col"><?php _ex( 'Bild', 'column header for list of achievements', 'dpa' ); ?></th>
                <th id="dpa-archive-achievements-name" scope="col"><?php _ex( 'Achievement Name', 'column header for list of achievements', 'dpa' ); ?></th>
    			<th id="dpa-archive-achievements-karma" scope="col"><?php _ex( 'Karma', 'column header for list of achievements', 'dpa' ); ?></th>
    			<th id="dpa-archive-achievements-excerpt" scope="col"><?php _ex( 'Description', 'column header for list of achievements', 'dpa' ); ?></th>
    
    		</tr>
    	</thead>

    However, the image is showing up huge in the box, whereas the actual image for the achievement is only a very small 32×32 px.

    How can I stop it from auto scaling the image up?

    Cheers!

    https://wordpress.org/plugins/achievements/

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

    (@djpaul)

    BuddyPress Lead Developer

    Hi,

    Do you happen to be this person who tweeted at me, or just coincidence? 🙂

    Nope, wasnt me!

    Please can you explain what you mean here? I still have no idea what to do to fix this… could you give me code example?

    Thanks 🙂

    Please can someone give me the code that I need to enter to stop the images from auto sizing? I cant figure this out at all from the code in the twitter link, where am I supposed to put that based on the code I have used here:

    This is my loop-achievements.php

    <thead>
    		<tr>
    
    			<th id="dpa-archive-achievements-image" scope="col"><?php _ex( 'Bild', 'column header for list of achievements', 'dpa' ); ?></th>
                <th id="dpa-archive-achievements-name" scope="col"><?php _ex( 'Achievement Name', 'column header for list of achievements', 'dpa' ); ?></th>
    			<th id="dpa-archive-achievements-karma" scope="col"><?php _ex( 'Karma', 'column header for list of achievements', 'dpa' ); ?></th>
    			<th id="dpa-archive-achievements-excerpt" scope="col"><?php _ex( 'Description', 'column header for list of achievements', 'dpa' ); ?></th>
    
    		</tr>
    	</thead>

    And this is my loop-single-achievement.php

    <td headers="dpa-archive-achievements-image">
    		<?php do_action( 'dpa_template_before_achievement_image' ); ?>
    
    		<?php dpa_achievement_image();?>
    
    		<?php do_action( 'dpa_template_after_achievement_image' ); ?>
    	</td>

    is this the same as wpachievements on codecanyon?

    If the uploaded image is actually 32px x 32px – you should be able to target the image via css to force the size. Something like (assuming the table is classed the same) maybe;

    .dpa-archive-achievements img {
    	height:32px;
    	width:32px;
    }

    Plugin Author Paul Gibbs

    (@djpaul)

    BuddyPress Lead Developer

    If you can drop a link to your website with the problem on, I can take a look and give you some CSS to sort the image sizing out. @jonioscm‘s CSS might well do the job just fine, too.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Image size for achievements loop’ is closed to new replies.