Places screen – Backend screen options

This topic contains 3 replies, has 3 voices, and was last updated by  Paolo 8 years, 2 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #161369

    Zois Koukopoulos
    Buyer
    Post count: 8

    Hello,

    I want to be able to view all places, on “Places” screen, with an additional column (a new custom field created from Place Settings > Custom Fields)

    Is it possible?

    Thanks

    #161438

    Guust
    Moderator
    Post count: 29970

    That would require a customization, and for some people would mean an additional 20 or more columns.

    #161499

    Zois Koukopoulos
    Buyer
    Post count: 8

    Hi Guust,

    Please give me some details of how to do this by myself.

    Should I add this kind of code to functions.php?

    
    
    add_filter('manage_posts_columns', 'my_columns');
    function my_columns($columns) {
        $columns['geodir_Visibility'] = 'Visibility';
        return $columns;
    }
    
    add_action('manage_posts_custom_column',  'my_show_columns');
    function my_show_columns($name) {
        global $post;
        switch ($name) {
            case 'geodir_Visibility':
                $visibility = get_post_meta($post->ID, 'geodir_Visibility', true);
                echo $visibility;
        }
    }

    Or must I interfere to plugins code?

    Thanks

    #161644

    Paolo
    Site Admin
    Post count: 31206

    Hi,

    I quickly tested your code in a demo and it seems to be working just fine.

    Let us know if you see any glitch and we will double check it.

    Thanks

Viewing 4 posts - 1 through 4 (of 4 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket