Toilets are not plumbed with traps.
The trap is in the bowl. After a flush, the fill valve "refills" the bowl, thus creating a seal against sewer gas coming into the home.
If you pipe to this untrapped drain, you will need to add a trap, and a vent. It's that simple.
For a washer p-trap, you will need to vent it within five feet.
Dangling a pipe over an open waste line is not the correct solution. That is why your house smells now.
If you have standing water in drains, those will need clearing.
If you need to cap off unused drains, they sell those are hardware stores. It may need a cap, or a plug.