Hi,
Ive been having some issues when in debug mode and not sure how to reolve them… this is the message i’m getting,
Notice: Trying to get property of non-object in /Users/MattStrange/Sites/pixelstores/wp-includes/post-template.php on line 29
It doesn’t get into specifics like what line number to fix but i have narrowed it down to do with get_the_ID();
For some reason WordPress doesn’t like the following,
function theme_scripts() { global $post, $pixelstore_mb_product; $productmeta = get_post_meta(get_the_ID(), $pixelstore_mb_product->get_the_id(), TRUE); if (isset($productmeta['productgallery']) && $productmeta['productgallery'] == "Hover Zoom") { wp_enqueue_script( 'etalage', $script_folder . 'jquery.etalage.min.js', 'jquery'); } } add_action('wp_enqueue_scripts', 'theme_scripts');
Narrow down even more…
$productmeta = get_post_meta(get_the_ID(), $pixelstore_mb_product->get_the_id(), TRUE);
Help appreciated.