Custom field as meta description
If you want to fetch the data from a custom field named wpse_desc: then here’s one way to do that with your code snippet: function wpse_custom_meta_description() { // Nothing to do if ( ! is_single() ) return; // Fetch our custom field value $desc = get_post_meta( get_queried_object_id(), ‘wpse_desc’, true ); // Output if( ! empty( … Read more