Undefined Variable post
-
Hi there! I turned on debug mode to make sure everything was ok with my theme and plugins and I’m getting this:
Notice: Undefined variable: post in /xxxx.php on line 62 Notice: Trying to get property of non-object in /xxx.php on line 62
And this is what it says in those lines…
// get taxonomies terms links function custom_taxonomies_terms_links(){ // THIS is Line 62 $post = get_post( $post->ID ); // get post type by post $post_type = $post->post_type;
… and so on….;-)
Funny thing is : the function does what it is supposed to do but gives out these errors. Right now it’s all in the functions.php but I want to move it to its own plugin. But first I want to get rid of these errors. Can anyone explain or help?
Thank you very much!
Anja
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Undefined Variable post’ is closed to new replies.