More than one meta field in a single meta box?

This is what you are looking for. /* Define the custom box */ // WP 3.0+ add_action( ‘add_meta_boxes’, ‘staff_details_metabox’ ); // backwards compatible add_action( ‘admin_init’, ‘staff_details_metabox’, 1 ); /* Do something with the data entered */ add_action( ‘save_post’, ‘save_staff_details’ ); /** * Adds a box to the main column on the Post edit screen * … Read more

Page as a child of a Custom Post Type

When you register the post type you can set hierarchical to true. hierarchical (boolean) (optional) Whether the post type is hierarchical (e.g. page). Allows Parent to be specified. The ‘supports’ parameter should contain ‘page-attributes’ to show the parent select box on the editor page. Default: false Note: this parameter was planned for Pages. Be careful, … Read more

Editing Theme to apply Co-Authors Plus

I think you’re looking for something like this article. It’s rather comprehensive, but I’ll just cover the multiple BIOs and avatars. You’ll want to change your HTML code to this instead: <?php $i = new CoAuthorsIterator(); ?> <?php while( $i->iterate() ) : ?> <div id=”authorinfo” class=”columns alpha omega marT30 marB20″> <a href=”https://wordpress.stackexchange.com/questions/88548/<?php the_author_meta(“url’); ?>”><?php echo … Read more

Adding wp_enqueue_media(); causes problem

There’s not enough information to really determine what is happening, but the best course of action is to make sure your code is only added to the options page, so it can’t interfere with anything on the edit page. You can use get_current_screen for that, like this: add_action( ‘current_screen’, ‘wpse113256_this_screen’ ); function wpse113256_this_screen() { $current_screen … Read more

Loading scripts to the Post Edit page only

We can improve a little bit with : function specific_enqueue($hook_suffix) { if( ‘post.php’ == $hook_suffix || ‘post-new.php’ == $hook_suffix ) { wp_enqueue_script( ‘custom_js’, get_template_directory_uri() . ‘/inc/meta/custom.js’, array( ‘jquery’ )); wp_enqueue_style( ‘custom_css’, get_template_directory_uri() . ‘/inc/meta/custom.css’) } } add_action( ‘admin_enqueue_scripts’, ‘specific_enqueue’ );