How to retrieve custom field types for all posts in WordPress/PHP?
Custom fields are saved as “post meta” which is stored in wp_postmeta. To retrieve them, you use the get_post_meta() function as follows: $value = get_post_meta( $post_id, $meta_key, $single ); $single will almost always be set to true if you’re working string data. Unfortunately, it defaults as false, so if you’re retrieving the data as a … Read more