EDIT
$thisid
can be passed as an array, as get_post_anscestors()
.
So try $ancestors = get_post_ancestors( array( $thisid ) );
I misread; it does accept strings, but maybe give an array a shot.
EDIT
$thisid
can be passed as an array, as get_post_anscestors()
.
So try $ancestors = get_post_ancestors( array( $thisid ) );
I misread; it does accept strings, but maybe give an array a shot.