Support » Plugin: Feed JSON » Add support for custom field

  • I needed support for custom field.

    I modified your code and added this to feed-json/template/feed-json.php:

    //custom_fields
    $custom_fields = get_post_custom();
    foreach($custom_fields AS $key => $value) {
    	if(substr($key, 0, 1) != "_") {
    		foreach($value AS $_value) {
    			$_value = trim($_value);
    			if($_value) {
    				$single[$key]=$_value;
    			}
    		}
    	}
    }

    after section // tags

    Might be interesting for others

    https://wordpress.org/plugins/feed-json/

  • The topic ‘Add support for custom field’ is closed to new replies.