I can’t expose the url as I am working on a client file, so I will have to post it here. This is the template file for the page I am trying to display the matrix on.
Note: I have the loop endwhile commented out — I always seem to have to do that. Related. I haven’t had any trouble with it otherwise. This is actually the third site I’ve done that for.
The custom post type is smile.
<?php
/**
Template Name: Smile
*/
get_header(); ?>
<div id="container">
<div id="content" role="main">
<div id="shadow"> </div>
<div class="breadcrumbs">
<?php
if(function_exists('bcn_display'))
{
bcn_display();
}
?>
</div>
<?php query_posts(array('post_type'=>'smile')); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<table>
<tr>
<?php foreach(get_cfm('Smile',$custom_post_type->ID) as $image): ?>
<td><img src="<?php echo $image->smile_url; ?>" width="200" alt="<?php echo $image->smile_alt; ?>" /></td>
<td><?php echo $image->smile_caption; ?></td>
<?php endforeach; ?>
</tr>
</table>
<div class="entry-content">
<?php the_content(); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
<?php edit_post_link( __( 'Edit', 'twentyten' ), '<span class="edit-link">', '</span>' ); ?>
</div><!-- .entry-content -->
</div><!-- #post-## -->
<?php comments_template( '', true ); ?>
<?php //endwhile;
// end of the loop. ?>
</div><!-- #content -->
</div><!-- #container -->
<?php get_sidebar(); ?>
<?php get_footer(); ?>