Dirk, you can use the post field functionality to get you pretty close to the page you referenced as an example.
You'll need a post body field and category field in your form as those are required to create a post. I quickly set up a form similar to yours and worked from there.
form screenshot
to add multiple images to a post, we'll use the built in WP gallery functionality. You can go back and add this in the editor after the post has been created by adding the [gallery] shortcode, or you can embed the shortcode into your single.php file something like the example below.. I chose to put the gallery below the post content.
<div class="post-content">
<?php the_content('Read the rest of this entry »'); ?>
<?php echo do_shortcode("[gallery]"); ?>
</div>
Once that's placed in the file where you want it, it will embed the gallery of images that are associated with that post. The default styling has the images on top and captions below, but to emulate your example a little better, I used a little CSS to override the default styles.
/*restyle default gallery ---------*/
dl.gallery-item {float:left; margin-right:15px; clear:both; overflow:hidden; width:100%!important}
dt.gallery-icon {float:left; padding:6px!important}
dd.gallery-caption {margin-left:180px!important; padding:6px 0 0 0; text-align:left!important; line-height:150%}
So, after all that's done, this is the end result.
post screenshot
Hopefully, that will get you going in the right direction. Once you're up and running, you might be interested in a related post on adding a WYSIWYG editor to the post form.
http://forum.gravityhelp.com/topic/post-preview#post-823
One last note, there are a variety of options you can use with the gallery shortcode, you can find out more about that on the WordPress codex site.
http://codex.wordpress.org/Gallery_Shortcode
Posted 15 years ago on Thursday November 26, 2009 |
Permalink