Ditto.
Same issue here.
C’mon people. With all the “I love flutter” comments floating around, can’t *someone* dumb it down for me?
I ditto the ditto.
Seems like someone ought to be able to explain it step-by-step in text-form for those of us who find an audio-free video tutorial (like the one on the Flutter site) to be a bit too vague to trust our sites to. I’m intrigued, but not enough to march forward without knowing what’s up…
To display image and text in a post (single.php or index.php)
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<?php $image-variable = get_post_meta($post->ID, 'image-variable', true); ?>
<h1><?php the_title(); ?></h1>
<?php the_content(); ?>
<?php echo get_image('image-variable'); ?>
<?php echo get('text-variable'); ?>
<?php endwhile; endif; ?>
Just change the “image-variable” in the three places that’s within the loop. If you have more images just add another <?php $image-variable = get_post_meta($post->ID, 'image-variable', true); ?> line with it’s variable name and add its <?php echo get_image('image-variable'); ?>.
If you want to put in more text fields, then add the <?php echo get('text-variable'); ?> were you want them to in the code. Remember to change the variable.
These have to be within a loop:
<?php echo get_image('image-variable'); ?>
<?php echo get('text-variable'); ?>
I hope I was clear enough. 🙂
I would like to say THANK YOU to hakansson! It’s interesting they didn’t use put the php after the <+?
Thanks so much, hakansson! My juju is renewed after hours of trying to get this to work.
If I’ve got alot of flutter custom fields on a page I tend to use the get_post_custom() function, and then take the data where needed in the page.
Example:
<?php
/**
* Template Name: Project Page
*/
$maxImagesInRow = 5;
get_header();
$meta = get_post_custom($post->ID);
$imageCount = (isset($meta['thumbnail-image'])) ? sizeof($meta['thumbnail-image']) : 0;
if($imageCount > 0)
{
?>
<div class="project-images">
<?php
for($i=0;$i < $imageCount; $i++)
{
$do_split = (($i % $maxImagesInRow) == 0);
?>
<a title="<?php echo $meta['label-image'][$i] ?>" rel="lightbox" class="group<?php echo ($do_split) ? ' first' : ''; ?>" href="/wp-content/files_flutter/<?php echo $meta['large-image'][$i] ?>"><img alt="" width="82" height="82" src="/wp-content/files_flutter/<?php echo $meta['thumbnail-image'][$i] ?>" /></a>
<?php
}
?>
</div>
<?php
}
?>
<?php get_footer(); ?>