• In my theme I have images on my home-templated repeated in my single article view on single.php. Is it any way to have images on single.php a lot larger than on home.php, using the same uploaded picture?

Viewing 3 replies - 1 through 3 (of 3 total)
  • That depends. What is being used in both templates to call the relevant image?

    Thread Starter ThorHammer

    (@thorhammer)

    esmi, thanks for replying. Here we go:

    in home.php:

    <?
    		if($post_image !== '') {
    		// display the image, its alt text, and wrap it with a link to "single.php" ?>
    		<div class="imgleft" >
    			<a href="<?php the_permalink(); ?>" title="<?php if($post_alt !== '') echo $post_alt; else the_title(); ?>">
    			<img src="<?php echo $post_image; ?>"
    			alt="<?php if($post_alt !== '') echo $post_alt; else the_title(); ?>"
    			 style="width:250px; " /></a></div>

    in single.php:

    <img src="<?php echo $post_image; ?>"
    	alt="<?php if($post_alt !== '') echo $post_alt; else the_title(); ?>"
    	class="left" width="250px" />

    I would like the image (uploaded original in more than 1000 px wide) to be repeated on single.php to be about 900 px wide.

    Try:

    <img src="<?php echo $post_image; ?>"
    	alt="<?php if($post_alt !== '') echo $post_alt; else the_title(); ?>"
    	class="left" width="900px" />

    in single.php.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Image size question’ is closed to new replies.