tags:

views:

33

answers:

1

Hi

I am building a simple WP theme but now i am stukc. I need to add an image on a fix place for post template A and 2 image on post_template B

like so

title img date content

title img img date content

Is it possible to make a template and on the admin side have the corresponding # of upload fields

A: 

You can do that with custom fields...

In the edit page view add a custom field called "img1" for instance and the value should be the image url. Then in your template A file you can output the image with:

<?php
$myimage = get_post_meta($post->ID, 'img1', true); 

if ($myimage) { ?>
<img src="<?php echo $myimage; ?>" />
<?php } ?>

And in template B you just do that 2 times ;)

Greenie
WOW that looks promising. So the only thing is after i have uploaded the image i need to copy the image url, rightgonna try it outtx
yous