Primary schools and special schools will remain open after the half-term break despite Wales' "fire-break" lockdown, it has been confirmed.
First Minister Mark Drakeford also announced that pupils in years seven and eight of secondary school will also still attend, as well as those taking exams.
However, all other pupils in year nine and above in secondary school will be expected to study at home between Monday, November 2 and Friday, November 6.
A 17-day national lockdown will start on Friday, October 23, from 6pm and will run until the start of Monday, November 9.
Everyone will be expected to stay at home, bars, pubs, cafés and restaurants will all shut their doors for more than a fortnight, non-essential shops and close contact services like hairdressers will all be required to close, and places of worship can only open for weddings and funerals.
It is being put in place to help regain control of coronavirus infection rates which have soared across many parts of Wales in recent weeks.
Between October 10 and 16, there were 3,870 new confirmed cases of coronavirus recorded by Public Health Wales. The R number is at 1.4 and the seven-day rolling incidence rate for Wales stands at more than 120 cases per 100,000 population.

Speaking at the Welsh Government press conference on Monday, Mr Drakeford said: "Primary and special schools will reopen as normal after half-term.
"Secondary schools will reopen after the half-term for children in years seven and eight. Pupils will be able to come in to take exams but other pupils will continue their learning from home for an extra week."
Have your say on whether a fire-break lockdown is a good idea:
Mr Drakeford added that Welsh universities will continue to provide a blend of in person and online learning.
"In the same way we are asking everyone to stay at home, if students have reading weeks or half-term they will also need to stay at home in their university accommodation," he said.
The Welsh Government said that while incidents of Covid-19 have risen in the student population, evidence shows this is taking place outside the teaching and learning environment.
Check the latest virus figures for your area:
Meanwhile, children can continue to access their usual childcare provider and can travel to provide, access or receive childcare.
The Welsh Government said: "All childcare providers, including Flying Start childcare, can remain open and offer their normal services, including provision through the half term holidays.
"This includes childcare providers operating from community centers, places of worship and school sites. Nannies can also continue to provide childcare."
Mr Drakeford said the virus needed the "short sharp shock" of a two-week national lockdown to bring infection rates down.
"If we do not act now it will continue to accelerate and there is a very real risk our NHS will be overwhelmed," he said.
"The number of people being taken to hospital with coronavirus symptoms is growing every day. Our critical care units are already full.
"We are asking our healthcare and social care staff, who have already done so much, to work even harder.
"Unless we act the NHS will not be able to look after the increasing number of people who will fall seriously ill in the coming weeks, even with the extra 5,000 beds we have available. And even more people will die.
"If this happens we would have to take even more extreme measures to bring the virus under control – we would be looking at an open-ended national lockdown such as the one we had in March of this year."
We're hosting a live chat to discuss the First Minister's announcement after his press conference at 12.15pm. You can share your thoughts and ask questions and we'll join in and try to answer any questions we can. You find it here.