-
-
Save billerickson/21ff280fb26c3b98120044d53f4e1b61 to your computer and use it in GitHub Desktop.
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