-
-
Save DavidPeralvarez/18565d48b3fca5cf6cc126db592ccfa0 to your computer and use it in GitHub Desktop.
Cómo añadir un Meta Box
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
Plugin Name: Meta Boxes y Metadata | |
Description: Aprendiendo a usar Meta Boxes y Metadata. | |
*/ | |
add_action( 'add_meta_boxes', 'dp_mbmd_register_meta_boxes' ); | |
function dp_mbmd_register_meta_boxes(){ | |
add_meta_box( 'dp_mbmd_ej_1', 'Título del meta box', 'dp_mbmd_ej_1_display', 'post', 'advanced', 'low'); | |
add_meta_box( 'dp_mbmd_ej_2', 'Título del meta box 2', 'dp_mbmd_ej_1_display', 'post', 'normal', 'high'); | |
} | |
function dp_mbmd_ej_1_display(){ | |
echo "Contenido del meta box."; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment