Try this code from skyrim nexus:
run this in the console:
stopquest BYOHRelationshipAdoptable
resetquest BYOHRelationshipAdoptable
setstage BYOHRelationshipAdoptable 0
stopquest BYOHRelationshipAdoptableOrphanage
resetquest BYOHRelationshipAdoptableOrphanage
setstage BYOHRelationshipAdoptableOrphanage 0
setstage BYOHRelationshipAdoptableOrphanage 100
If that isn't enough to allow for adoption, try this:
Click the child you wish to adopt and type:
street kids: SetFactionRank xx004290 1
orphanage kids: SetFactionRank xx004290 10
where xx is replaced with the load order id of Hearthfire (probably 02 or 03)