If you search the internet for foods you should eat to conceive a boy or foods you should eat to conceive a girl, there will be plenty of results.

To conceive a boy, websites will recommend eating foods that will change the vaginal pH to alkaline in order to allow those weaker, Y-bearing sperm to live longer. Some of these recommendations include: salty foods, cereal products and foods with potassium, such as bananas. Restricting dairy products is recommended because they make the vaginal fluids more acidic. (Of course, you are supposed to get plenty of calcium when you are pregnant, so this is probably not a good idea.)

To conceive a girl, websites will recommend eating foods high in calcium, such as cheese and yogurt, and foods high in magnesium but low in potassium, such as spinach.
There is no scientific evidence that eating particular foods will influence a baby’s gender at time of conception. However, there was a study published in Proceedings of the Royal Society B: Biological Sciences that showed a link between higher energy intake around the time of conception and the birth of sons. Many of the recommendations for particular foods seem to come from that study.

The researchers looked at 740 first-time pregnant mothers in Britain who didn’t know the sex of their fetus. The women provided records of their eating habits before and during the early stages of pregnancy, and researchers analyzed the data based on estimated calorie intake at the time of conception. Among women who ate the most, 56 percent had sons, compared with 45 percent among women who ate the least. In addition, the women who had sons were more likely to have eaten a higher quantity and wider range of nutrients, including potassium, calcium and vitamins C, E and B12. There was also a link between women eating breakfast cereals and producing sons.