Ok... so working on a theme designed by Astoundify... which although beautiful has been disgustingly made.
Also using WP Job Manager.
Have created a new custom field, 'fax'. Want fax to display after the phone number. Astoundify has nicely made this display on the theme using a widget - making the WP Job Manager hooks completely useless.
What i need to do is get that fax number to display immediately after phone. Is this possible to do with the functions file so that i don't have to modify the core files?
The following is the code which is outputting the phone number:
public static function the_phone() {
global $post;
$phone = $post->_phone;
if ( ! $phone ) {
return;
}
?>
<div class="job_listing-phone">
<span itemprop="telephone"><a href="tel:<?php echo esc_attr( preg_replace( "/[^0-9,.]/", '', $phone ) ); ?>"><?php echo
esc_attr( $phone ); ?></a></span>
</div>
<?php
}
And i am trying to output the fax using the following:
add_action( 'single_job_listing_start', 'display_fax_number_data', 50 );
function display_fax_number_data() {
global $post;
$fax = get_post_meta( $post->ID, '_fax', true );
if ( $fax ) {
echo '<li>' . __( 'Fax:' ) . ' ' . $fax . '</li>';
}
}
And its working... just not in the right place. Have lost a day trying to do something that should have been so simple.
Any help appreciated.