Rob McElhenney and Rob Rosell will pen the script for the late-season pilot, which is in contention for midseason and beyond at the network.

Fox is looking to program to middle America.

The network has handed out a late-season pilot order to an untitled multicamera comedy from the team behind FX's long-running hit It's Always Sunny in Philadelphia.

The project revolves around a woman, her ex-husband and her new wife, who all work together to raise a family in middle America. The comedy hails from 20th Century Fox Television.

Rob McElhenney and Rob Rosell will pen the script and executive produce the comedy alongside It's Always Sunny collaborators Nick Frenkel, Charlie Day and Glenn Howerton. (While Day, Howerton and McElhenney star in Sunny — and Howerton toplines NBC comedy A.P. Bio — none are expected to have onscreen roles in the project.) The comedy is in contention for a midseason — or beyond — order at Fox, which continues to develop off-cycle as broadcast networks look to year-round development.

This is the Sunny team's second pilot in the works at Fox. Day, McElhenney, Howerton and Frenkel also have the retirement community multicamera comedy pilot Cool Kids in contention at the network this season with Vicki Lawrence, David Alan Grier, Leslie Jordan and Martin Mull attached to star.

The Fox comedy arrives as broadcast networks are looking to program to underserved audiences in middle America following the success of ABC's Roseanne reboot, which overperformed in the region.

The untitled McElhenney and Rosell pilot joins fellow off-cycle order Bless This Mess, starring Lake Bell and Dax Shepard. The Liz Meriwether comedy will shoot in June and is also in contention for midseason at Fox.

McElhenney, Day and Howerton are repped by WME, 3 Arts and Sloane Offer; Rosell is with UTA and Hansen Jacobson.

Keep track of all the latest renewals and cancellations with THR's scorecard and of all the pilot pickups with our handy guide. For complete coverage, bookmark THR.com/upfronts.