<?php

function site_custom_rest(){

    register_rest_field(array('markets','venders','other_services','tlg_channels',"top_forums"), '_market_site', array(
            'get_callback' => function (){
	            global $post;
	            $links = get_post_meta($post->ID, '_market_site',true);
                wp_reset_postdata();
                return $links;
            }
    ));
}
add_action('rest_api_init', 'site_custom_rest' );
