How to work with images?
-
I am searching for several hours docs, plugins and forum but i still do not understand, how can i handle the image attachements. If there are some information, they are for previous version of WP and they are useless now
Scenario:
I want to allow the editor to attach the images, but then i want to take control over the images from the templates. I do not want to use any thirdparty galleries etc.When I add the image, the image is linked to the document but not shown. The editor can add the image to the document manualy, but i do not want it. I want to make in template something like:
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<h1><?php the_title(); ?></h1>
<?php the_content(); ?>
<div id="images">
<?php the_images('show=all&see=linked-thumbnails); ?>
<div>
<?php endwhile; else: ?>
which should generate something like
<h1>This is my title</h1>
this is my content
<div id="images">
<a href="fullsize-image" title="image description"><image src="thumbnail" alt=image name" /></a>
<a href="fullsize-image2" title="image2 description"><image src="thumbnail2" alt=image2 name" /></a>
</div>
The topic ‘How to work with images?’ is closed to new replies.