Add common Post Actions to Custom Meta Column

I’ve created a custom post section and removed all of the default items (title, editor, etc…) using add_action and added my own custom meta boxes.

The Issue:
Since i’ve removed the default Title box there’s no way to get back into the post since it shows the custom meta box content in custom columns on the top level of the section:
Custom Meta Column Display

Read More

The Question:
How do I add the “Edit | Quick Edit | Trash | View” options to the custom column like WordPress does by default with the Title?

Code being used for section:

add_action('init', 'addchic_register');

function addchic_register() {

    $labels = array(
        'name' => _x('Addy Chicken', 'post type general name'),
        'singular_name' => _x('Addy Chicken', 'post type singular name'),
        'add_new' => _x('Add New', 'addchic item'),
        'add_new_item' => __('Add New Convo Item'),
        'edit_item' => __('Edit Convo Item'),
        'new_item' => __('New Convo Item'),
        'view_item' => __('View Convos Item'),
        'search_items' => __('Search Convos'),
        'not_found' =>  __('Nothing found'),
        'not_found_in_trash' => __('Nothing found in Trash'),
        'parent_item_colon' => ''
    );

    $args = array(
        'labels' => $labels,
        'public' => true,
        'publicly_queryable' => true,
        'show_ui' => true,
        'query_var' => true,
        /*'menu_icon' => get_stylesheet_directory_uri() . '/article16.png',*/
        'rewrite' => true,
        'capability_type' => 'post',
        'hierarchical' => false,
        'menu_position' => null,
        'supports' => array('')
      ); 

    register_post_type( 'addchic' , $args );
}

Meta boxes:

add_meta_box("addy_meta", "Addy", "addy_meta", "addchic", "normal", "low");


function addy_meta(){
  global $post;
  $custom = get_post_custom($post->ID);
  $addy = $custom["addy"][0];
  ?>
  <input size="100" name="addy" value="<?php echo $addy; ?>" />
  <?php
}

Thanks!

Related posts

Leave a Reply

2 comments