Wordpress の functions.php ファイルについて、次のエラー メッセージが表示されます。functions.php ファイルを削除した後でも、同じエラーが発生します。
これを解決するために私ができることは誰にもありますか?
編集:
functions.php ファイルのコードを以下に貼り付けます。このファイルを削除しましたが、まだ同じエラーが発生していることに注意してください。
<?php
// add 'Music' post type
add_action( 'init', 'create_music_post_type' );
function create_music_post_type() {
register_post_type( 'music',
array(
'labels' => array(
'name' => __( 'Music' ),
'add_new_item' => __( 'Add New Music Release' ),
'singular_name' => __( 'Release' )
),
'public' => true,
'has_archive' => true,
'menu_position' => 5,
'rewrite' => array('slug' => 'music'),
'supports' => array('title','editor','thumbnail')
)
);
}
// add 'Press' post type
add_action( 'init', 'create_press_post_type' );
function create_press_post_type() {
register_post_type( 'press',
array(
'labels' => array(
'name' => __( 'Press' ),
'add_new_item' => __( 'Add New Press Feature' ),
'singular_name' => __( 'Press' )
),
'public' => true,
'has_archive' => true,
'menu_position' => 5,
'rewrite' => array('slug' => 'press'),
'supports' => array('title','editor','thumbnail')
)
);
}
// add 'Blog' post type
add_action( 'init', 'create_blog_post_type' );
function create_blog_post_type() {
register_post_type( 'blog',
array(
'labels' => array(
'name' => __( 'Blog' ),
'add_new_item' => __( 'Add New Blog Post' ),
'singular_name' => __( 'Blog' )
),
'public' => true,
'has_archive' => true,
'menu_position' => 4,
'rewrite' => array('slug' => 'blog'),
'supports' => array('title','editor','thumbnail')
)
);
}
//Remove all Twenty Eleven Sidebars
add_action( 'after_setup_theme','remove_twentyeleven_all_widgets', 100 );
function remove_twentyeleven_all_widgets() {
remove_filter( 'widgets_init', 'twentyeleven_widgets_init' );
}
//Add Twitter widget area
function twitter_widgets_init() {
register_sidebar( array(
'name' => 'Twitter',
'id' => 'twitter',
'before_widget' => '<div>',
'after_widget' => '</div>',
'before_title' => '<h2>',
'after_title' => '</h2>',
) );
}
add_action( 'widgets_init', 'twitter_widgets_init' );
//Add Album widget area
function album_widgets_init() {
register_sidebar( array(
'name' => 'New Album',
'id' => 'new_album',
'before_widget' => '<div>',
'after_widget' => '</div>',
'before_title' => '<h2>',
'after_title' => '</h2>',
) );
}
add_action( 'widgets_init', 'album_widgets_init' );
//Add thumbnail sizes
add_theme_support( 'post-thumbnails', array( 'post','page' ) );
add_image_size('album-artwork', 166, 166, true);
add_image_size('gallerix-thumbnail', 175, 114, true);
//Add custom footer message
function remove_footer_admin () {
echo 'Fueled by love, music and <a href="http://www.wordpress.org" target="_blank">WordPress</a> | Designed by <a href="http://www.electrickiwi.co.uk" target="_blank">Electric Kiwi</a>';
}
add_filter('admin_footer_text', 'remove_footer_admin');
?>
更新: すべてが機能しているようです。どういうわけかFTPが正しく機能していないように見えるため、File Managerを介してfunctions.phpファイルを削除する必要がありました。それを介してアップロードした後、すべて問題ないようです。みんなの答えをありがとう。