Your problem is that your pile was all made out of "greens" (nitrogen rich, soft, moist). That results in what you got- stinky, slimy mess. You need to balance the "greens" with an equal volume of "browns" (carbon rich, hard, dry). The twigs are browns but don't count, because they aren't going to break down any time in the next couple years. They are just there for aeration.
Please do check out the composting 101 and composting basics threads:
https://www.helpfulgardener.com/forum/vi ... 35&t=29022
https://www.helpfulgardener.com/forum/vi ... 35&t=56881
we also have a whole big list of green and brown composting ingredients:
https://www.helpfulgardener.com/forum/vi ... =35&t=9089
I mainly rely on collected fall leaves and straw for my browns, but see the list for other choices. You still can do this. Get yourself a pile of browns at least equal in size to the green mess you have (remembering that "green" has nothing to do with color, manure is a "green") and mix them together. It will remediate and eventually become good compost.
A properly made compost pile has NO odor (well, maybe a slight, pleasant earthiness). If it is getting stinky, you know you need to change something!