Home › Forums › Pro Support › How to show own excerpt ? › Reply To: How to show own excerpt ?
July 27, 2016 at 7:44 pm
#287
Keymaster
Hmm, you could try wrapping the above PHP in a function and hooking it into WPSP.
Something like this:
add_action( 'wpsp_before_content','wpsp_add_custom_meta' );
function wpsp_add_custom_meta()
{
$opp = new WI_Volunteer_Management_Opportunity( get_the_ID() );
?>
<div class="volunteer-opp-info">
<?php $opp->display_meta( ( $opp->opp_meta['one_time_opp'] == 1 ) ? $opp->format_opp_times() : $opp->opp_meta['flexible_frequency'], __( 'When:', 'wired-impact-volunteer-management' ) ); ?>
<?php $opp->display_meta( $opp->format_address(), __( 'Where:', 'wired-impact-volunteer-management' ) ); ?>
<?php $opp->display_meta( $opp->opp_meta['contact_name'], __( 'Contact:', 'wired-impact-volunteer-management' ) ); ?>
<?php $opp->display_meta( $opp->get_email_as_link( $opp->opp_meta['contact_email'] ), __( 'Contact Email:', 'wired-impact-volunteer-management' ) ); ?>
<?php $opp->display_meta( $opp->opp_meta['contact_formatted_phone'], __( 'Contact Phone:', 'wired-impact-volunteer-management' ) ); ?>
<?php $opp->display_meta( $opp->get_open_volunteer_spots(), __( 'Open Volunteer Spots:', 'wired-impact-volunteer-management' ) ); ?>
</div><!-- .volunteer-opp-info -->
<?php
}
Not sure if it will work or not, but worth a shot.