• I am new to wordpress, but stumbling through this code.
    I am using the simple-portfolio sample theme to structure this plug-in within my own theme, but I need to display the full-size photos in the single-portfolio.php. Somewhere, the image class is being set to thumbnail size, but I can’t figure out where.

    I don’t know if this will help…but this is my file so far

    <div id="container">
    
    				<?php get_template_part( 'loop', 'index' ); ?>
    
    				<div id="workcontent">
    					<div id="port-info">
    					<div class="title"><?php the_title(); ?></div>
    					<?php foreach (simple_portfolio_info() as $key=>$info_item): $key = explode('_', $key); array_shift($key); $key = ucfirst(implode(' ', $key)); ?>
    							<div class="box">
    								<span><?php echo $key; ?></span>
    								<?php echo trim($info_item) == '' ? '...' : $info_item; ?>
    							</div>
    					<?php endforeach; ?>
    				</div>
    
    				<div id="gallery">
    					<?php foreach (simple_portfolio_media() as $media_item): ?>
    					<?php
    						switch ($media_item['type']):
    							case 'image':
    								$src = wp_get_attachment_image_src($media_item['value'], 'full');
    								echo "<a href=\"$src[0]\">" . wp_get_attachment_image($media_item['value']) . "</a>";
    								break;
    							case 'youtube':
    								echo "<p>";
    								echo "<object width=\"480\" height=\"385\">";
    								echo "	<param name=\"movie\" value=\"https://www.youtube.com/" . $media_item['value'] . "&hl=en_US&fs=1\"/>";
    								echo "	<param name=\"allowFullScreen\" value=\"true\"/>";
    								echo "	<param name=\"allowscriptaccess\" value=\"always\"/>";
    								echo "	<embed src=\"https://www.youtube.com/v/" . $media_item['value'] . "&hl=en_US&fs=1\" type=\"application/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"true\" width=\"480\" height=\"385\"/>";
    								echo "</object>";
    								echo "</p>";
    								break;
    							case 'snippet':
    								echo $media_item['value'];
    								break;
    						endswitch;
    					?>
    					<?php endforeach; ?>
    				</div>
    
    	</div>

    Thanks in advance for any advice!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi esskay, I’ve came across your post through a google search as I’m having the exact same problem.

    Did you manage resolve this to display the full size image rather than the thumbnail?

    Hi Esskay, after some more playing about with the code, i got the fullsize images displaying.

    simply replace the following line:

    echo "<a href="$src[0]">" . wp_get_attachment_image($media_item['value']) . "</a>";

    with this

    echo "<p>" . wp_get_attachment_image($media_item['value'], 'full') . "</p>";

    In the line above, I have replaced the a href link with p tags.

    Hope this helps!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Simple Portfolio] Full Size Image instead of Thumbnails’ is closed to new replies.