Support » Fixing WordPress » manage/edit custom columns – function not being recognized

  • Hi all.

    I am trying to figure out why I keep getting an error with the following function when trying to add columns to my custom post type screen in the admin.

    I get an “Expecting ‘(‘ on line 10 error.

    -LINE 10 = “function lingerie-post_edit_columns($columns){“

    add_action("manage_posts_custom_column", "lingerie-post_columns");
    
    add_filter("manage_edit-lingerie-post_columns", "lingerie-post_edit_columns");
    
    function lingerie-post_edit_columns($columns){
        $columns = array(
            "cb" => "<input type=\"checkbox\" />",
            "title" => _x('Title', 'column name'),
            "categories" => __('Categories'),
            "post-tags" => __('Tags'),
            "designer-tags" => __('Tags'),
            "boutique-tags" => __('Tags'),
            "author" => __('Author'),
            "comments" => __('Comments'),
            "date" => __('Date'),
        );
        $columns['comments'] = '<div class="vers"><img alt="Comments" src="' . esc_url( admin_url( 'images/comment-grey-bubble.png' ) ) . '" /></div>';
        return $columns;
    }

    I have no idea why I keep getting this error as I can see no missing ‘(‘ PLEASE help 🙂

    Thanx,
    Daniel

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘manage/edit custom columns – function not being recognized’ is closed to new replies.