Forum Replies Created

Viewing 1 replies (of 1 total)
  • gevisoft

    (@gevisoft)

    Hi Jubblink I am rather novice in WP but some how solved this problem. Do not pretend this is the best solution. First of all we have build in directoryengine custom field like et_phone and these ones added by web master. For example you may add et_phone2, et_phone3 and so on but nice phone will be missed and replace with some ugly text:. So my solution is add multiple et_phone (just add custom field with same name typed by hand not from drop down menu in wp admin setting->custom fields. Fill data. One small trick rest in file that shows phone usually single_place_details.php but there could be others for example in mobile directory, add in header php tag

    $phones = get_post_meta($post->ID, “et_phone”, false);
    Do now worry that $post->ID is not in global or set here it is set in files that includes single_place_details.php.

    Find this one
    <?php if($place->et_phone){ ?>
    <li class=”phone-place”>
    <span itemprop=”telephone” class=”phone-place limit-display” <?php _e(“Phone”, ET_DOMAIN); ?>>
    <i class=”fa fa-phone”></i><?php echo ($place->et_phone) ? $place->et_phone : __( ‘No specify phone’ , ET_DOMAIN );; ?>
    </span>

    <?php } ?>

    and replace with
    <?php if(!empty($phones)):
    foreach($phones as $phone):
    ?>
    <li class=”phone-place”>
    <span itemprop=”telephone” class=”phone-place limit-display” <?php _e(“Phone”, ET_DOMAIN); ?>>
    <i class=”fa fa-phone”></i><?php echo ($phone) ? $phone : __( ‘No specify phone’ , ET_DOMAIN );; ?>
    </span>

    <?php
    endforeach;
    endif;
    ?>

Viewing 1 replies (of 1 total)