Okay... So I tried 147 more times, I did a whole new rewrite; and I got someting that works for me, but it still has issues.
I took-out
the About Us Custom field is: agentpage (value: agent|78,agent|82,agent|90 (where 78 is the Agent page number from the WP3 URL))
The QUERY POST now tries to return all of the Pages (including the Newsletter page, the Featured Listings page...) in the coded HTML format below, but since I only have eleven Agents, I was able to limit the posts_per_page to 11 (I call that a "fix", but not a "solution").
??? Any ideas on how to set the posts_per_page to -1 (show all) without returning the kitchen sink - I want just those pages that are Agent Pages with the Custom Fields ???
Also, one other issue, I lost control of the Agent order, it is now reverse.
Code:
<?php
$categoriesCF = get_post_meta($post->ID, "agentpage", true);
$allCategories = explode(",", $categoriesCF);
foreach ($allCategories as $category) {
$pieces = explode("|", $category);
$link = get_permalink($pieces[1]);
query_posts("posts_per_page=11&post_type=page&post_parent=$pieces[1]");
while (have_posts()) : the_post(); ?>
<table class="agent-info" width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="200" align="left" valign="top">
<img src='<?php echo get_post_meta($post->ID, 'agent_photo_190', true); ?>' /></td>
<td align="left" valign="top">
<div class="agent-info-box">
<h3><?php echo get_post_meta($post->ID, 'agent_name', true); ?></h3>
<body><?php echo get_post_meta($post->ID, 'agent_bio', true); ?></body><br />
<p style="padding-left: 30px;">
<body>phone: <?php echo get_post_meta($post->ID, 'agent_phone', true); ?></body><br />
<body>fax: <?php echo get_post_meta($post->ID, 'agent_fax', true); ?></body><br />
<body>email: <a href='mailto:<?php echo get_post_meta($post->ID, 'agent_email', true); ?>' /><?php echo get_post_meta($post->ID, 'agent_email', true); ?></a></body><br />
<body>website: <a href='<?php echo get_post_meta($post->ID, 'agent_website', true); ?>' /><?php echo get_post_meta($post->ID, 'agent_website', true); ?></a> </body><br />
</p>
</div>
</td>
</tr>
</table>
<br /><hr style='width:100%;' /><br />
<?php endwhile; wp_reset_query();
};
?>
Bookmarks