これについて助けてくれてありがとう、メンバー関数check_capabilities()へのエラー呼び出し
これでわだち掘れで立ち往生!
ディレクトリレイアウト:
- 「テーマフォルダ」
- Functions.php(「テーマ」のメインディレクトリ)
- index.php
- style.css
- 関数フォルダー(「テーマフォルダー」内にあります)
- Customize.php
関数は次のようにcustomize.phpを呼び出します。
<?php require_once('functions/customize.php'); ?>
Customize.php:
<?php
add_action('customize_register', 'adaptive_customize_register');
function adaptive_customize_register($wp_customize) {
//logo
$wp_customize->add_section('adaptive_logo', array(
'title' => __('Add Logo', 'adaptive_framework'),
'description' => __('Upload your main logo, this shows in the header', 'adaptive_framework'),
'priority' => '25'
));
$wp_customize->add_setting('adaptive_custom_settings[add_logo]', array(
'default' => 0,
'type' => 'option'
));
$wp_customize->add_control('adaptive_custom_settings[display_logo]', array(
'label' => __('Display logo?','adaptive_framework'),
'section' => 'adaptive_logo',
'settings' => 'adaptive_custom_settings[display_top_logo]',
'type' => 'checkbox'
));
}
?>
私が次のようなエラーが発生したので、誰かが助けてくれるならお願いします:
Fatal error: Call to a member function check_capabilities() on a non-object in C:\xampp\htdocs\wordpress\wp-includes\class-wp-customize-control.php on line 160