I have an unusual situation where I need to make the built-in post type 'page' non-hierarchical.
I printed the post type object with var_dump(get_post_type_object('page')); die; and I got this:
object(stdClass)#164 (26) {
["labels"]=>
...
}
["description"]=>
string(0) ""
["publicly_queryable"]=>
bool(false)
["exclude_from_search"]=>
bool(false)
["capability_type"]=>
string(4) "page"
["map_meta_cap"]=>
bool(true)
["_builtin"]=>
bool(true)
["_edit_link"]=>
string(16) "post.php?post=%d"
["hierarchical"]=>
bool(true)
....
}
How might I go about modifying the post-type object so that ["hierarchical"]=>bool(false)?