Hey there,
What’s the PHP error you’re getting.
To output the WordPress debugging information you can open your wp-config.php file and change:
define('WP_DEBUG', false);
To:
define('WP_DEBUG', true);
You can also have these errors output to a debug.log file located in your /wp-content/ folder, to do this add the following to your wp-config.php file:
define('WP_DEBUG_LOG', true);
Using WP_DEBUG would put the errors on the site, you can hide those and just have them out put the WP_DEBUG_LOG (if set to true) by using this as well:
define('WP_DEBUG_DISPLAY', false);
Let me know what you find.
Take care.
Hi Timothy,
Thanks for your help! I have just set the first DEBUG to True now (not the log yet) and uploaded the config file again and now,for some reason when I add something to the functions.php and then look on the site, it still displays the website?
And it doesnt display any error (would it show the error on the website then online?)
edit! I uploaded it in the wrong directory … its been a long day
error is>
“Notice: Undefined variable: wp_customize in /customers/c/7/c/fitnessxtreme.co.uk/httpd.www/wp/wp-content/themes/wpbootstrap/functions.php on line 68 Fatal error: Call to a member function add_setting() on a non-object in /customers/c/7/c/fitnessxtreme.co.uk/httpd.www/wp/wp-content/themes/wpbootstrap/functions.php on line 68”
this is the line
` $wp_customize->add_setting(
$color[‘slug’], array(
‘default’ => $color[‘default’],
‘type’ => ‘option’,
‘capability’ =>
‘edit_theme_options’
)
);
I used the first and last function on this website:
http://www.smashingmagazine.com/2013/03/05/the-wordpress-theme-customizer-a-developers-guide/
Also, I’d need to add the function to change the header image asap as I deleted the picture and now can’t set a new one 😛
Hey there,
The notice is fine in that it shouldn’t cause a white page, it’s just a notice because the wp_customize was not first defined.
The important one there is the fatal error, you’re trying to call a method but you haven’t yet created the object. Because the object hasn’t been created the method does not yet exist and thus results in an error that will stop everything.
http://codex.ww.wp.xz.cn/Plugin_API/Action_Reference/customize_register
How are you writing the code?
Take care.
I’m just flicking through examples to get an idea of how things work, like with this one i added it to the functions.php and then in the actual page. but no matter which function i try (i tried a navwalker customiser too) it makes my page go blank
this is the line
` $wp_customize->add_setting(
$color[‘slug’], array(
‘default’ => $color[‘default’],
‘type’ => ‘option’,
‘capability’ =>
‘edit_theme_options’
)
);
Is that all the code, I’m sure there is more isn’t there?
Best to include code in the code backticks, or pastebin if it’s a longer snippet.
What tutorial or information are you following?
Did you look at and study the example and how to hook in your code here:
http://codex.ww.wp.xz.cn/Plugin_API/Action_Reference/customize_register
Take care.