wp-admin page is blank

Something is wrong with my wp-admin page, it just shows up blank. I am pretty sure it has to do with my function.php file there is no whitespace on the top or bottom, but when I delete it completely, the wp-admin folder works again.

here is the functions.php file

<?php

add_action("manage_posts_custom_column",  "booktime_custom_columns");
add_filter("manage_edit-booktime_columns", "booktime_edit_columns");

function booktime_custom_columns($column){
    global $post;

    switch ($column) {
        case "name":
            the_excerpt();
        break;
        case "address":
            $custom = get_post_custom();
            echo $custom["address"][0];
        break;
        case "phone":
            $custom = get_post_custom();
            echo $custom["phone"][0];
        break;
        case "date":
            $custom = get_post_custom();
            echo $custom["date"][0];
        break;
        case "bottles":
            $custom = get_post_custom();
            echo $custom["bottles"][0];
        break;

    }
}

function booktime_edit_columns($columns){
    $columns = array(
        "cb" => "<input type=\"checkbox\" />",
        "title" => "Post should show",
        "description" => "name",
        "address" => "address",
        "phone" => "phone",
        "date" => "date",
        "bottles" => "bottles"
    );

    return $columns;
}

?>

<?php
add_action("admin_init", "admin_init_booktime");

function admin_init_booktime(){

    add_meta_box("name", "name", "name", "booktime", "normal", "low");

}
?>

<?php
function name() {
    global $post;
    $custom = get_post_custom($post->ID);
    $name = ( !empty($custom["name"][0]) ) ? $custom["name"][0]: "";
    ?>
    <p><label>Name:</label><br />
        <input type="text" name="name" value="<?php echo $name; ?>"/></p>
    <?php
}
?>

<?php
add_action('save_post', 'save_details_booktime');

function save_details_booktime(){
    global $post;
    $custom_meta_fields = array( 'name' );

    foreach( $custom_meta_fields as $custom_meta_field ):
        if(isset($_POST[$custom_meta_field]) && $_POST[$custom_meta_field] != ""):
            update_post_meta($post->ID, $custom_meta_field, $_POST[$custom_meta_field]);
        endif;
    endforeach;

}
?>

EDIT:
I turned wp-config debug on and I get the following

Parse error: syntax error, unexpected '<' in /Users/anderskitson/Sites/fiftyfity/wp-content/themes/fiftyfityNew/functions.php on line 61

5 Answers
5

Have you tried changing your function names? The main one that would concern me as potentially having overlap is name(). If I’m doing a theme for myself, usually I’ll use my_ as the prefix for everything, otherwise I’ll use a unique identifier based on the name of the theme.

Leave a Comment