404 for children in hierarchical custom post type

Turned out to be interference from another Flatpack hack I had in place to stop it displaying child CPTs when outputting its widgets.

For reference, the damage was being done by a pre_get_posts hook. Worth checking this if you’re similarly stuck.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)