If you want it to hold really well in drywall, molly bolts are the way to go. (Metal anchors with legs that fold out on the back.) You screw into the molly bolt with the accompanying screw (machine screw). I believe the maximum weight for a molly screw in single drywall is around 10-15 kilos. Just check if you have single or double drywall (one or two sheets of drywall, that is). The downside of molly bolts is that they leave gigantic holes when you remove them.
The alternative is a regular drywall anchor, which leaves smaller holes but has slightly lower strength. I've installed safety gates for my children with regular drywall anchors, and it has worked fine.
You use these anchors in drywall whether you're attaching a plank or a safety gate to the wall.
Good luck.