Archived topic
Price Breakdown in Featured Image
3 replies · Started by Mitch and Justine on May 25, 2020
Hi, we are also trying to add price breakdowns under the featured image headers on both our home page and archives pages.
This is the way our featured images are looking right now:

This is the way we want them to look:

We tried adding a hook with this code (the same as in our single content recipe posts):
<?php
$cost = get_post_meta( get_the_ID(), 'cost', true );
echo '<span class="recipe-cost">' . $cost . '</span>';
?>
We just can't figure out how to specify the proper location or how to add each price breakdown separately. Thanks for your help!
Mitch & Justine
Hi there,
Have you tried the generate_after_entry_title hook inside a Hook Element?: https://docs.generatepress.com/article/hooks-element-overview/
Let me know :)
That location worked. Thanks!
You're welcome :)