My web page ought to show all filmmakers, which were tagged as “filmmaker” in my posts. I do have posts that function multiple filmmaker (meta_key = filmmaker) in customized fields, however solely the primary one seems within the “overview” that I need to show. The opposite two appear to be ignored. What do I do flawed? (or my predecessor, as a result of I took over this web page). Thanks one million.
That is my Code (picture of submit connected)
<desk class="movies">
<?php
$letter="";
foreach($wpdb->get_col("SELECT DISTINCT meta_value FROM $wpdb->postmeta WHERE meta_key = 'filmmaker' ORDER BY meta_value") as $identify):
$title = cnext_letterheading($identify);
if($title && ($title != $letter)) {
$letter = $title;
echo '<tr><td><h3>', $letter, '</h3></td></tr>';
}
?>
<tr class="submit movie film-line">
<td class="title">
<a href="<?php echo get_site_url(); ?>/?filmmaker=<?= urlencode($identify) ?>">
<h2 class="entry-title"><?= htmlspecialchars($identify) ?></h2>
</a>
</td>
</tr><!-- #post-## -->
<?php endforeach ?>
</desk>