0

It references line 231 of the taxonomy.php file (See image) and all it says on that line is:

 * Checks that the taxonomy name exists.
 *
 * Formerly is_taxonomy(), introduced in 2.3.0.
 *
 * @package WordPress
 * @subpackage Taxonomy
 * @since 3.0.0
 *
 * @uses $wp_taxonomies
 *
 * @param string $taxonomy Name of taxonomy object
 * @return bool Whether the taxonomy exists.
 */
function taxonomy_exists( $taxonomy ) {
    global $wp_taxonomies;
    return isset( $wp_taxonomies[(string)$taxonomy] );
}

It's on a general page that lists Neighborhoods. I'm using the ACF plugin but haven't encountered this error before.

Any ideas would be most helpful. Thanks.

enter image description here

UPDATED CODE -----

Here is the code i'm using in the internal header which happens to be the case for this particular header:

<!DOCTYPE html>

  <html>

    <head>

      <title>

        <?php

      echo wp_title();


          bloginfo( 'name' );

        ?>

      </title>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      <meta name="robots" content="index, nofollow" />
      <?php wp_head(); ?>
    </head>

    <body>

      <div class="container-hdr-neighborhoods">

        <header class="col-hdr-internal">

           <a class="logo" href="<?php ( 'home' ) ?>" alt="Return Home" title="Return Home"></a>

          <nav role="navigation">

            <?php

              $args = array(
                'menu' => 'main-menu'
                );

              wp_nav_menu( $args );

            ?>

          </nav>

          <h1 class="test1"><?php wp_title($echo); ?></h1>

  </header>

</div>
<!--/container-hdr-home-->

Here is the code for the body portion of the page which all i'm doing is using the query to get all the permalinks from the custom post types and creating a LI's within a UL to list all the neighborhoods.

<?php

/*

  Template Name: Neighborhoods Main Page

*/

get_header( 'internal' );?>

<div class="container-space"></div>

<div class="container-main">

<?php

  $args = array(
    'post_type' => 'neighborhood'
  );

  $the_query = new WP_Query( $args );

?>

  <ol class="col-neigh-title neighborhood">

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

    <li><a href="<?php the_permalink(); ?>"><?php the_field( 'neighborhood_name' ); ?></a></li>

  <?php endwhile; else: ?>

  </ol>

  <p>There are no posts or pages here.</p>

<?php endif; ?>

</div>

<?php get_footer(); ?>

UPDATED 3-22-2014 -------

Here is a snippet from my functions.php file where I enable custom menus:

//Enable custom menus
add_theme_support( 'menus' );

//Register Navigations
add_action( 'init', 'my_custom_menus' );
function my_custom_menus() {
    register_nav_menus(
        array(
            'primary-menu' => __( 'Primary Menu' ),
            'neighborhood-menu' => __( 'Neighborhood Menu' ),
            'place-menu' => __( 'Place Menu' )
        )
    );
}

ENTIRE FUNCTIONS.PHP FILE -------

<?php

// Load the Theme CSS

function theme_styles() {

  wp_enqueue_style( 'normalize', get_template_directory_uri() . '/css/normalize.min.css' );
  wp_enqueue_style( 'bootstrap', get_template_directory_uri() . '/css/bootstrap.min.css' );
  wp_enqueue_style( 'googlefonts', 'http://fonts.googleapis.com/css?family=Yanone+Kaffeesatz');
  wp_enqueue_style( 'googlefonts2', 'http://fonts.googleapis.com/css?family=Open+Sans');
  wp_enqueue_style( 'googlefonts3', 'http://fonts.googleapis.com/css?family=Open+Sans+Condensed:300');
  wp_enqueue_style( 'main', get_template_directory_uri() . '/style.css' );
  wp_enqueue_style( 'iconset', get_template_directory_uri() . '/css/mfglabs_iconset.css' );
  wp_enqueue_style( 'icon_fonts', get_template_directory_uri() . '/css/font/' );

  wp_register_style( 'flexslider', get_template_directory_uri() . '/css/flexslider.css' );
  if( is_page( 'home' ) ) {
      wp_enqueue_style( 'flexslider' );
  }

}

// Load the Theme JS

function theme_js() {

  wp_register_script( 'flexslider', get_template_directory_uri() . '/js/flexslider.js', array('jquery'), '', true );
  if( is_page( 'home' ) ) {
      wp_enqueue_script( 'flexslider' );
  }
  wp_enqueue_script( 'theme_js', get_template_directory_uri() . '/js/theme.js', array('jquery'), '', true );
  wp_enqueue_script( 'theme_js', get_template_directory_uri() . '/js/bootstrap.min.js', array('jquery'), '', true );

}

add_action( 'wp_enqueue_scripts', 'theme_js' );

add_action( 'wp_enqueue_scripts', 'theme_styles' );

//Enable custom menus
add_theme_support( 'menus' );

//Register Navigations
add_action( 'init', 'my_custom_menus' );
function my_custom_menus() {
    register_nav_menus(
        array(
            'primary-menu' => __( 'Primary Menu' ),
            'neighborhood-menu' => __( 'Neighborhood Menu' ),
            'place-menu' => __( 'Place Menu' )
        )
    );
}

// Widget Function
function create_widget( $name, $id, $description ) {

    $args = array(
      'name'          => __( $name ),
      'id'            => $id,
      'description'   => $description,
      'before_widget' => '<li id="%1$s" class="widget %2$s">',
      'after_widget'  => '</li>',
      'before_title'  => '',
      'after_title'   => ''
    );

    register_sidebar( $args );
}

create_widget( 'First Icon', 'first_icon', 'Displays as the first icon' );
create_widget( 'Second Icon', 'second_icon', 'Displays as the second icon' );
create_widget( 'Third Icon', 'third_icon', 'Displays as the third icon' );
create_widget( 'Fourth Icon', 'fourth_icon', 'Displays as the fourth icon' );

// Background Color


function color_header_bg() {
    global $post;
    // set this to the handle of one of your stylesheets
    $handle = '/css/style.css';
    // set this to the meta key you've used
    $meta_key = 'background_color';
    $bg_color = get_post_meta( $post->ID, $meta_key, $single = true );
    $css = "header { background-color: $bg_color; }";
    wp_add_inline_style( $handle, $css );
}

add_action(  'wp_enqueue_scripts', 'color_header_bg' );

// // Added Parent meta box in Places custom post type, created parent/child relationship neighborhood and places
// add_action( 'add_meta_boxes_place', 'my_add_meta_boxes' );

// function my_add_meta_boxes( $post ) {

//   add_meta_box(
//     'place-parent',
//     __( 'Parent', 'example' ),
//     'my_parent_meta_box',
//     $post->post_type,
//     'side',
//     'core'
//   );
// }

// function my_parent_meta_box( $post ) {

//   $parents = get_posts( array( 'post_type' => 'neighborhood', 'numberposts' => -1 ) );

//   if ( !empty( $parents ) ) {

//     echo '<select name="parent_id">';

//     foreach ( $parents as $parent ) {
//       printf( '<option value="%s"%s>%s</option>', esc_attr( $parent->ID ), selected( $parent->ID, $post->post_parent, false ), esc_html( $parent->post_title ) );
//     }

//     echo '</select>';
//   }
// }
function when_rewrite_rules( $wp_rewrite ) {
  $newrules = array();

  $new_rules['place/(.*)/(.*)$'] = 'index.php?place=$matches[2]';
    $wp_rewrite->rules = $new_rules + $wp_rewrite->rules;
    //echo '<pre>'; print_r($wp_rewrite->rules);die;
}
add_filter('generate_rewrite_rules','when_rewrite_rules');
?>

enter image description here

10
  • There are two things that jump out from your code. First, you use wp_title() instead of the_title() inside your <h1> tag. Second, you use the 'menu' parameter instead of 'theme_location' in your wp_nav_menu() call. Both of those potentially call taxonomy-related functions, so try fixing those, and report back if they had any impact. Mar 3, 2014 at 0:29
  • @ChipBennett changing the 'menu' to 'theme_location' worked but it seems to have combined all of the menu items i have throughout the site into one alphabetical menu. It did get rid of the taxonomy issue. I also posted the menus i declared in my functions.php file to see if maybe this has something to do with it. Thanks.
    – MARS
    Mar 23, 2014 at 0:22
  • @ChipBennett also i tried changing the wp_title to the_title however i created a specific header for internal pages which i have 4 of (Home, Neighborhoods, Blog, About) and when i change the wp_title to the_title it works find except on the "Blog" page where it makes the main header into the name of the most recent post so i just left it as wp_title since i'm using this template tag to make the header title for the page, not sure if there is a better way to do this. Sorry for the delayed response and thanks for your help.
    – MARS
    Mar 23, 2014 at 0:26
  • can you upload your entire functions.php somewhere we can look? Are you using any extra non standard plugins such as ACF? Does deactivating all plugins fix the issue? Would it be possible to activate xdebug and get a stacktrace for those warnings?
    – Tom J Nowell
    Mar 23, 2014 at 1:12
  • 1
    This sounds like a "I've done 100 things, and there is a problem" issue, where it could be any one of the 100 things or an individual item. You need to start separating things out and isolating what the issue is. See what the absolute minimum is that you need to reproduce the issue.
    – Tom J Nowell
    Mar 23, 2014 at 17:52

1 Answer 1

1

The problem is going to be with theme or plugin code, not with the Core code. Something is using that function incorrectly. For example, this:

taxonomy_exists(array());

... produces a Warning that ought to look familiar:

Warning: Illegal offset type in isset or empty in /path/to/wordpress/wp-includes/taxonomy.php on line 231

So, somewhere, something is passing a bad argument to that function-- presumably something in your header or something hooked to hooks that execute in the header. Without more code, that is the best I can do.

6
  • I can't leave it off of its coming soon page plugin but here is the link to the only page that is having the issue. Also i'm curious how you debug PHP code as I really have no idea where to begin, this was my first real WordPress project and the neighborhoods are pulled together querying all of the neighborhood custom post type titles. Here's a link to the page, hopefully the code can give some indication of what's going on dcinsideout.com/neighborhoods
    – MARS
    Mar 2, 2014 at 22:53
  • I've updated my code above below the line UPDATED CODE for both the header that i'm using on that particular page and the body of the page. Thank you for your persistent help in this community s_ha_dum, you've helped me before and i appreciate your time. Hopefully something catches your eye because like i said i'm really new at this and it's been a couple months removed from this project.
    – MARS
    Mar 2, 2014 at 22:58
  • @MARS: I rolled back your edit. Your code should edited into the question, not into my answer.
    – s_ha_dum
    Mar 2, 2014 at 22:59
  • Didn't even realize i could do that, anyways i've updated the question, thanks.
    – MARS
    Mar 2, 2014 at 23:45
  • not sure why i didn't read your answer closely and provide more code, but i'm wondering what code would you need to better answer? The Functions.php or header-internal.php which i'm using on the pages that produce the error? Thanks.
    – MARS
    Mar 23, 2014 at 0:29

Not the answer you're looking for? Browse other questions tagged or ask your own question.