• 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/ufKnMoe

    Here it is zoomed in.
    http://imgur.com/4XpXxQY

    Code 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
    `

    View post on imgur.com

    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 setups

    header(“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.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter shareyourpeace

    (@shareyourpeace)

    Update.

    In my functions.php file, lines 46 and 47 were empty.
    I deleted them and now I get my dashboard back.

    But the 505 error still lingers on.

    In this line of your functions.php:

    add_action('wp_enqueue_scripts', 'my_theme_js()');

    You don’t need the parentheses in the function callback:

    add_action('wp_enqueue_scripts', 'my_theme_js');

    Thread Starter shareyourpeace

    (@shareyourpeace)

    @stephencottontail
    Thank YOU !!
    That was a great catch !

    The above fix also resolved the fact that my ‘menu’ didn’t load properly.
    The below shows it now does.

    View post on imgur.com

    I’ve got one more If you don’t mind.
    On my ‘contacts’ page, the ‘sidebar’ that I created loads improperly.

    Correct Sidebar Output should look like this:
    http://imgur.com/gZicTCB

    My Sidebar Output
    http://imgur.com/9FlirVw

    I am outputting
    Pages
    Archives
    Categories
    Meta
    in Sidebar.

    The below is a closeup. It has a deprecation error.

    View post on imgur.com

    thanks again.

    It’s hard to tell from a screenshot, but you may have forgotten to close a <div> or a <ul> in your contact page. Can you post the contents of whatever PHP file is being used to generate your contact page to Pastebin and post the link here?

    Thread Starter shareyourpeace

    (@shareyourpeace)

    Thanks again,
    I just pasted it below. All tags are paired up.

    page.php

    `
    <?php get_header(); ?>

    <section class=”row”>
    <div class=”small-12 columns text-center”>
    <div class=”leader”>

    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

    <h1><?php the_title(); ?></h1>
    <p><?php the_content(); ?></p>

    <?php endwhile; else : ?>
    <p><?php _e( ‘Sorry, no pages found.’); ?></p>
    <?php endif; ?>

    </div>
    </div>
    </section>

    <?php get_footer(); ?>
    `

    page-sidebar-left.php

    `
    <?php
    /*
    * Template Name: Left Sidebar
    */
    ?>

    <?php get_header(); ?>

    <section class=”two-column row no-max pad”>
    <div class=”small-12 columns”>
    <div class=”row”>
    <!– Primary Column –>
    <div class=”small-12 medium-7 medium-offset-1 medium-push-4 columns”>
    <div class=”primary”>

    <?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>

    <h1><?php the_title(); ?></h1>
    <p><?php the_content(); ?></p>

    <?php endwhile; else : ?>
    <p><?php _e( ‘Sorry, no pages found.’); ?></p>
    <?php endif; ?>
    </div>
    </div>
    </div>
    <!– Secondary Column –>
    <div class=”small-12 medium-4 medium-pull-8 columns”>
    <div class=”secondary”>
    <h2 class=”module-heading”>Sidebar</h2>
    </div>
    </div>
    </div>
    </section>

    <?php get_footer(); ?>
    `

    In page-sidebar-left.php, you might have an additional <div class="row"> in there. See if this code works: http://pastebin.com/95nrQ4c2

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘white screen; error-warnings:’ is closed to new replies.