Each stay would have to qualify for free dining on its own, so you would have to purchase park tickets. If you know you are going back in the near future, you could make the first set of tickets long enough to cover your full stay and hold on to the 2nd set for another visit.
Like JustCallMeMommy wrote, book your first hotel of choice under Free Dining with enough ticket days to cover your whole vacation
For the second hotel of your split stay: call Disney and book a ticketless package (hotel and dining, no tickets). Free Dining will probaby not qualify, but with this option you do not need to buy a new set of expensive tickets just for being able to purchase the Dining Plan. This is not available to be booked online. The system thinks you are trying to book a room-only reservation and purchasing Dining is not an option in the booking process when choosing zero ticket days.
(if this is wrong, please someone correct me. But I am 98% sure that it is still possible to do so)
Our Authorized Disney Vacation Planners are here to provide personalized, expert advice, answer every question, and uncover the best discounts.
Let Dreams Unlimited Travel take care of all the details, so you can sit back, relax, and enjoy a stress-free vacation.