Does the following work for you? Teams 7 and 8 are the ones who never have a bye, and will oppose 24 other teams over the 8 months, so the optimum is when they play 7 of the other teams twice and the remaining 10 teams just once, 24 = 2*7 + 1*10. The corresponding formula for the teams with a bye would be 21 = 2*4 + 1*13. I believe the schedule below meets both these criteria. I am guessing you have more than 4 possible venues (1 per team?), so I not tried to get balance for the 4 homes below.
Hope that helps.
Home 1 Home 2 Home 3 Home 4 Byes
Month 1 ( 5 7 4 6) ( 1 9 16 10) (15 17 12 8) (3 18 2 13) (11 14)
Month 2 ( 6 8 3 5) ( 2 10 15 9) (16 18 11 7) (4 17 1 14) (12 13)
Month 3 ( 7 15 14 16) (12 13 10 4) ( 1 8 11 5) (6 9 18 17) ( 3 2)
Month 4 ( 8 16 13 15) (11 14 9 3) ( 2 7 12 6) (5 10 17 18) ( 4 1)
Month 5 (12 5 16 9) (17 7 3 10) (11 2 8 4) (1 6 14 13) (18 15)
Month 6 (11 6 15 10) (18 8 4 9) (12 1 7 3) (2 5 13 14) (17 16)
Month 7 ( 5 15 4 3) (16 2 1 17) (12 14 18 11) (8 7 9 13) ( 6 10)
Month 8 ( 6 16 3 4) (15 1 2 18) (11 13 17 12) (7 8 10 14) ( 5 9)