The forums ran from 2008-2020 and are now closed and viewable here as an archive.
Home › Forums › Back End › Trying to pull custom field template into post previews
I am using this CFT plugin.
It works fine inside the post and pages.
But I want the data to appear on the home page at the bottom of each article.
This is the code in the function.php where the post previews are generated.
<?php $miles = htmlspecialchars(get_post_meta($post->ID, "miles", true)); ?> <?php if ($miles != "") { echo '<h3 class="summary-deck">' . $miles . '</h3>'; } ?>
</article>
Do you know why this is not working?
Thanks!