The prevalence of stunting in Indonesia (21.5%), West Sumatra (23.7%), Lima Puluh Kota District (24.3%). Koto Baru Simalanggang Health Center has experienced an increase in cases. Maternal education affects knowledge and attitudes, which impact on posyandu visits. Low posyandu visits (74.09%) contribute to high stunting rates. The study aims to determine the relationship between maternal knowledge and attitudes with compliance with posyandu visits.The type of research is quantitative with a cross sectional design. The research was conducted from January to June in Nagari Koto Baru Simalanggang. The study population, mothers of toddlers aged 2-3 years (104 people), sample 51 respondents. Purposive sampling technique. Data collection techniques using questionnaires and documentation studies. Data were analyzed using the Chi Square test. There were (58.8%) respondents with good knowledge, (54.9%) respondents had a supportive attitude, (54.9%) respondents were obedient to the posyandu, there was a relationship between knowledge and compliance with posyandu visits (p=0.010; OR = 4.667; CI = 1.410-15.448) and maternal attitudes with compliance with posyandu visits (p=0.009; OR = 4.688; CI = 1.431-15.359) Compliance with posyandu visits is influenced by the knowledge and attitudes of mothers of toddlers, because knowledge shapes attitudes. There is a relationship between maternal knowledge and attitude with compliance with posyandu visits. Health workers are advised to increase education and the role of cadres to invite mothers to the posyandu to prevent stunting.