I keep losing when I attack and I don't know what to train?
I also had trouble when I reached barracks level 7. For me wizards have always been a little better on defense then on offense.
My personal preference at this level is to create an army of around 10-12 giants, 4-6 wall-breakers, and split the rest of your supply between archers and goblins. Send in giants first to absorb the initial damage then send in wall-breaks to break the walls just as the giants are reaching them and follow up by attacking with the rest of your forces. If there are any defenses on the outside have the archers hit those, don't have your whole army attacking the same defensive structure at the same time.
You can try mixing in a few wizards (they are good), but for me they are time consuming to produce and expensive.
Final note is that at level 8 barracks the healer becomes a great asset to your army. Get 2 of those to back up your giants and you'll find yourself winning a lot more attacks!