Genesis Sandbox Featured Posts – Add custom fields
-
This filter is working fine except that its applying to all instances of the widget not just the one I want
//*Add custom fields to Used Equipment Widgets add_filter( 'gsfc_after_post_content', 'wt_used_equip_custom_fields' ); function wt_used_equip_custom_fields() { $year = get_field('year'); $hours = get_field('hours'); $price = get_field('price'); echo "<div class='equip-descrip'><p>"; echo $year . ", " . $hours . " hours" . "</p>"; echo "<div class='used-price'>"; if(get_field('price')) : echo '$' . number_format((get_field('price')), 0, '.', ',') . " + GST"; endif; echo "<a class='button see-details' href=" . the_shortlink . ">See Details</a>"; echo "</div>"; }
Viewing 8 replies - 1 through 8 (of 8 total)
Viewing 8 replies - 1 through 8 (of 8 total)
- The topic ‘Genesis Sandbox Featured Posts – Add custom fields’ is closed to new replies.