The $post variable – Did I get the grasp of how the Backend actions get parsed?

As I’ve already wrote in question comments, at the very beginning of creating the new post or page first choose a template and save as draft. Meta box will appear after save if right template is used. <?php add_action( ‘add_meta_boxes’, ‘my_add_meta_box’ ); function my_add_meta_box() { // get template file name $template_basename = wp_basename( get_page_template() ); … Read more

Dynamic number of fields in a meta box

$fl is ‘quantity’, but from your code snippet it is not clear what $id is set to. I think it is something like 481 or 708. So name=”‘.$fl.’-‘.$id. ‘” will result in quantity-481 or quantity-708 and not quantity-708-481. Check the HTML of your metabox if the name is what you expect (use something like FireBug … Read more

Is ‘repeatable’ a field type for meta boxes?

WordPress has no real form API, you have to create almost all form elements from scratch. ‘type’ => ‘repeatable’ is part of an external library. Google lead me to this article: Reusable Custom Meta Boxes Part 3: Extra Fields – maybe a starting point for your research?

Hybrid meta box, how to show?

Problem solved: <?php echo get_post_meta( get_the_ID(), ‘doc’, true ) ?> ‘doc’ fetches one of meta_boxes array items. Then you can echo them And.. check if you are editing the right single.php (my mistake).

Output list from each line of metabox (shortcode)

You missed $output in “for” loop, wrong $project(s) name. add_shortcode( ‘cv’, ‘vp_cv’ ); function vp_cv( $atts, $content = null ) { //….. while( $query->have_posts() ) : $query->the_post(); $title = get_the_title(); $projects = get_post_meta($post->ID, ‘resume_projects’, true); if( $projects ) $projects = explode(“\n”, $projects); $output .= ‘<p class=”cv-title”>’ . $title . ‘</p>’; $output .= ‘<p class=”cv-projects”>’; $output … Read more

Save JSON object attributes to custom metabox

I’ve found a possible solution. Not sure if it is safe though jQuery(function(jQuery) { // Uploading files var file_frame; var wp_media_post_id = wp.media.model.settings.post.id; // Store the old id var set_to_post_id = 5; // Set this formfield = jQuery(this).siblings(‘.custom_upload_image’); preview = jQuery(this).siblings(‘.custom_preview_image’); // Create the media frame. file_frame = wp.media.frames.file_frame = wp.media({ multiple: false // Set … Read more

Post Excerpt field only showing for default administrator

To correctly show the Excerpt meta box for Custom Post types you should use the supports property register_post_type. Supported values are as follows, and I suggest referring to the register_post_type Function Reference for more details – ‘title’ ‘editor’ (content) ‘author’ ‘thumbnail’ (featured image, current theme must also support post-thumbnails) ‘excerpt’ ‘trackbacks’ ‘custom-fields’ ‘comments’ (also will … Read more

Adding a metabox shortcode “paypal accept payment” in my custom post type back-end

Add this to your child theme / plugin functions.php. I think this should do the trick. Let me know function your_meta_callback( $post ) { echo Paypal_payment_accept(); } add_meta_box( ‘your_meta’, __( ‘Meta Box Title’, ‘your-textdomain’ ), ‘your_meta_callback’, ‘your-posttype-name’, ‘side’ ); For more information see WordPress Codex on add_meta_box(). Update: Ok I have looked into this. If … Read more