Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?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