white screen; error-warnings:
-
I have changed the code from ‘false’ to define( ‘WP_DEBUG’, true); Here are the warnings and errors that return in the browser.
note: I am using a tutorial where the instructor uses names such as:
function wpt_theme_styles()
and
function wpt_wpt_theme_js()
Mine are named:
function my_theme_styles()
and
function my_theme_js()Would this even make a difference and Why ?
`the following is the path that results in the browser error.
http://localhost:8888/projectWordPressThemeDev2/wp-content/themes/my_portfolio/wp-admin
``
Warning: call_user_func_array() expects parameter 1 to be a valid callback, function ‘my_theme_js()’ not found or invalid function name in /Applications/MAMP/htdocs/projectWordPressThemeDev2/wp-includes/plugin.php on line 505
`
You need to zoom in to read the error:
http://imgur.com/ufKnMoeHere it is zoomed in.
http://imgur.com/4XpXxQYCode from plugin.php line 505
`
do {
foreach ( (array) current($wp_filter[$tag]) as $the_ )
if ( !is_null($the_[‘function’]) )
call_user_func_array($the_[‘function’], array_slice($args, 0, (int) $the_[‘accepted_args’]));
`the following is the path that results in the browser error.
http://localhost:8888/projectWordPressThemeDev2/wp-admin/`
Warning: Cannot modify header information – headers already sent by (output started at /Applications/MAMP/htdocs/projectWordPressThemeDev2/wp-content/themes/my_portfolio/functions.php:47) in /Applications/MAMP/htdocs/projectWordPressThemeDev2/wp-includes/pluggable.php on line 1173
`code from pluggable.php from line 1163-1173
`
$status = apply_filters( ‘wp_redirect_status’, $status, $location );
if ( ! $location )
return false;
$location = wp_sanitize_redirect($location);
if ( !$is_IIS && php_sapi_name() != ‘cgi-fcgi’ )
status_header($status); // This causes problems on IIS and some FastCGI setupsheader(“Location: $location”, true, $status);
return true;
}
endif;
`Here is my function.php code
`
function my_theme_styles() {
wp_enqueue_style(‘foundation_css’, get_template_directory_uri() . ‘/css/foundation.css’);
//wp_enqueue_style(‘normalize_css’, get_template_directory_uri() . ‘/css/normalize.css’);
wp_enqueue_style(‘googlefont_css’, ‘http://fonts.googleapis.com/css?family=Asap:400,700,400italic,700italic’);
wp_enqueue_style(‘main_css’, get_template_directory_uri() . ‘/style.css’);
}add_action(‘wp_enqueue_scripts’, ‘my_theme_styles’);
function my_theme_js() {
wp_enqueue_script(‘modernizr_js’, get_template_directory_uri() . ‘/js/modernizr.js’, ”, ”, false );
wp_enqueue_script(‘foundation_js’, get_template_directory_uri() . ‘/js/foundation.js’, array(‘jquery’), ”, true );
wp_enqueue_script(‘main_js’, get_template_directory_uri() . ‘/js/app.js’, array(‘jquery’, ‘foundation_js’), ”, true );
}add_action(‘wp_enqueue_scripts’, ‘my_theme_js()’);
`Thanks for the help.
The topic ‘white screen; error-warnings:’ is closed to new replies.