Add Screen Options for Post Meta or Custom Field (3 posts)

  1. Chris
    Posted 4 years ago #

    I am trying to add a specific custom field to the screen options for a custom post type and have no idea how to do so.

    Here is a screen shot to explain:
    <img src="http://i50.tinypic.com/20ixnk0.jpg" border="0" alt="Image and video hosting by TinyPic">

    I would like to add the custom field similar to the way all in one SEO shows the values. Make sense?

    Thanks all!

  2. Chris
    Posted 4 years ago #

    Sorry, that screen shot was a major fail... here it is again: http://imgur.com/cPyjA

  3. amit_kosti
    Posted 4 years ago #

    function cust_field_text($column_name){
            if($column_name === 'cust_col'){
    add_action('manage_posts_custom_column', 'cust_field_text', 10, 2);
    function cust_fields($defaults){
        $defaults['cust_col'] = __('cust fields');
        return $defaults;
    add_filter('manage_posts_columns', 'cust_fields');

    Somehow I managed to show all used custom field with values in post-list.
    Used above code in functions.php

    here is image - http://imgur.com/6HLMW

Topic Closed

This topic has been closed to new replies.

About this Topic