In South Africa the baboons not only annoy farmers by raiding cornfields but also chicken coops.

Rewritten:
In South Africa the baboons not only annoy farmers by raiding cornfields but also annoy chicken coops. Hmmm! "In South Africa, the baboons annoy farmers by raiding cornfields and the chicken coops."

do you put "the chicken coops" or just "chicken coops"???

Just my $.02 here.

In South Africa the baboons not only annoy farmers by raiding cornfields, but also by raiding chicken coops.

I'm doubtful the article 'the' is needed, unless there are specific chicken coops you have in mind.
...but take Writeteacher's word as an authority here. Hope this helps.

In the sentence, you can use "the chicken coops" or "chicken coops" depending on the context and specificity you want to convey.

If you use "the chicken coops," it implies that there are specific chicken coops in mind, possibly the chicken coops belonging to the farmers being mentioned. It suggests a more specific and personal connection to the chicken coops.

If you use "chicken coops" without the article 'the,' it has a more general and inclusive meaning. It indicates that baboons annoy chicken coops in general, without specifying particular chicken coops or a specific group of chicken coops.

So, the choice between "the chicken coops" and "chicken coops" depends on the level of specificity you want to convey in the sentence.