/18408-test-metabox.php Secret
Created
December 9, 2018 16:46
Star
You must be signed in to star a gist
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: 18408 test metabox | |
* Plugin URI: https://core.trac.wordpress.org/ticket/18408 | |
*/ | |
add_action( 'add_meta_boxes', 'myplugin_add_custom_box' ); | |
function myplugin_add_custom_box() { | |
add_meta_box( | |
'myplugin_sectionid', | |
__( 'My Post Section Title', 'myplugin_textdomain' ), | |
'myplugin_inner_custom_box', | |
'post', | |
'side' | |
); | |
} | |
function myplugin_inner_custom_box() { | |
global $post; | |
$a = new WP_Query('post_type=page'); | |
while($a->have_posts() ) : $a->the_post(); | |
endwhile; | |
wp_reset_postdata(); | |
the_title(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment