Help! Notice: Undefined offset: 0
-
Hello,
I’m getting errors while implementing this plugin-in into my theme.
Here’s the error:
Notice: Undefined offset: 0 in …/wp-includes/query.php on line 2249
And here’s how I’m calling this information:
<?php $menuloop = new WP_Query(array( 'posts_per_page' => -1, 'meta_key' => 'menuoption_menu_pricing', 'orderby' => 'meta_value_num', 'order' => 'ASC', 'post_type' => 'menu', 'tax_query' => array( array( 'taxonomy' => 'menu_type', 'field' => 'slug', 'terms' => wp_get_post_terms($post->ID, 'menu_type', array("fields" => "slugs")) ) ) )); ?>
The theme also has portfolio sliders on the main page which disappear when this plugging is activated…
Here’s how the code to load the slides:
<?php $portfolio_type = get_the_term_list( $post->ID, 'portfolio_type' ); $portfolioloop = new WP_Query(array( 'paged' => get_query_var('paged'), 'post_type' => 'portfolio', 'posts_per_page' => -1, 'tax_query' => array( // Note: tax_query expects an array of arrays! array( 'taxonomy' => 'portfolio_type', // my guess 'field' => 'name', 'terms' => $portfolio_type ), ), )); ?>
I’m not great when it comes to php coding, but I’m sure the problem is due to the way the codes are written above.
I’m sure it’s an easy fix for someone with experience! ??
Thank in advance for your help!
Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
- The topic ‘Help! Notice: Undefined offset: 0’ is closed to new replies.