404 & wrong datatype for array
-
I’ve got a function that finds out if the current page is a sub page of another. Lifted the code from a post here I think:
<?php // detect the page tree and set the stylesheet accordingly function is_tree($p_id) { global $post; if(is_page()&&(in_array($p_id, $post->ancestors) || $post->post_parent==$p_id || is_page($p_id))) return true; else return false; }; ?>This lets me add a style sheet according the the top level parent. Anyway. When testing the 404 page the header goes wrong:
Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/fhlinux133/i/inq-chat.duttonsdev.co.uk/user/htdocs/inq_cms/wp-content/themes/chat_combined/desk_header.php on line 39
with line 39 being the 3rd line of code above.
This error is repeated 8 times.
Any ideas?
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
The topic ‘404 & wrong datatype for array’ is closed to new replies.