How create meta (custom) fields in wordpress posts ? <?php /** * Register meta boxes. */ function meta_register_meta_boxes() { add_meta_box( 'meta-1', __( 'Custom Field', 'meta' ), 'meta_display_callback', 'contracts' ); } add_action( 'add_meta_boxes', 'meta_register_meta_boxes' ); /** * Meta box display callback. * * @param WP_Post $post Current post object. */ function meta_display_callback( $post ) { ?> <div class="meta_box"> <style scoped> .meta_box{ display: grid; grid-template-columns: max-content 1fr; grid-row-gap: 10px; grid-column-gap: 20px; } .meta_field{ display: contents;...
We provide knowledgeable blogs related to php, jQuery, html, css, wordpress, woocommerce, cordova app with examples in 2021.