Can’t get metabox value (a url) returned using WPAlchemy

Try changing your display_url_info function to <?php add_filter(‘beernews-child-theme_post’, ‘display_url_info’); function display_url_info() { // usually needed global $basic_metabox; $basic = $basic_metabox->the_meta(); if($basic[‘post_link_url’]) { echo $basic[‘post_link_url’]; } else { echo ‘ERROR : “post_link_url” empty’; } } ?> And not to be a jerk, but I would like to point out that WP Alchemy is not a plugin … Read more

get_posts that haven’t been assigned a specific custom field

You can do it with a posts_where filter and a subquery. Note that you have to explicitly set suppress_filters to false, as get_posts normally ignores filters: function wpse28018_posts_where( $where ) { global $wpdb; $where .= ” AND {$wpdb->posts}.ID NOT IN ( SELECT DISTINCT post_id FROM {$wpdb->postmeta} WHERE meta_key = ‘alternate_page’ )”; return $where; } // … Read more

Should custom meta boxes be able to output shortcodes the same as WordPress’ native post editor?

Short answer: no. Shortcodes are for injecting content directly in the Post Content, by the user, via the Post Edit screen. If your data are coming from a metabox, you have other, better, more efficient, and easier-to-control means of injecting content into the Post Content: primarily, the the_content filter (for general usage), or custom action … Read more

Extra option in editor

Maybe this tutorial will help you. EDIT: some code in case the original source gets lost. 1st) Add the meta box to all the post types we need function wpse31877_add_custom_meta_boxes() { foreach ( array( ‘post’, ‘page’ ) as $post_type ) { add_meta_box( ‘wp_custom_attachment’ ,’Custom Attachment’ ,’wpse31877_custom_attachment’ ,$post_type ,’side’ ); } } add_action( ‘add_meta_boxes’, ‘wpse31877_add_custom_meta_boxes’ ); … Read more