Papa John's still has a pizza problem.

John Schnatter, the founder and public face of the company, has resigned as chairman and apologized for using the N-word on a conference call.

But the company still has to contend with a dreadful sales slump. It's losing the pizza wars to Pizza Hut and Domino's.

Earlier this decade, Papa John's (PZZA) was gaining market share against its competitors, said Chris O'Cull, an analyst for Stifel.

But a couple of years ago, customers started paying closer attention to price. Pizza Hut started offering more aggressive promotional deals. Domino's (DPZ), the industry leader, had been offering deals for years. After years of selling customers on quality, Papa John's wasn't able to switch gears.

"Papa John's never really had competed on a value message," O'Cull said.

After years of expanding, the company's sales growth began to slow.

Papa John's reported late last year that comparable store sales were up just 1%, a sharp slowdown from the year before.

Schnatter blamed the NFL's response to players who were taking a knee to protest racial injustice. That only seemed to make things worse.

Related: Papa John's founder resigns as chairman after using N-word on conference call

The comments spurred a backlash on social media, and Papa John's had to distance itself from neo-Nazi groups. The company eventually ended its partnership with the NFL. And the business started hurting even more.

"The sales really fell off a cliff in the fourth quarter," O'Cull said.

In the last three months of 2017, comparable store sales in North America were down 3.9%. It got worse in the first three months of this year — a 5.3% drop.

Steve Ritchie, who replaced Schnatter as CEO in January, has promised to boost sales by overhauling the company's marketing efforts, lowering prices, increasing digital sales through better tech and making stores more efficient.

Now he also has to contend with the fallout from Schnatter.

On Wednesday, Schnatter apologized and resigned as chairman after Forbes reported that he used the N-word in May while participating in a role-playing exercise designed to prevent public relations crises.

Wall Street responded well on Thursday. Shares of the company closed up 11%.

But Schnatter remains on the board and owns almost 30% of the stock.

Related: Pizza Hut replaces Papa John's as the NFL's official sponsor

And his exit could still cause problems for the company, particularly with marketing and advertising, said BTIG analyst Peter Saleh. The company's chief marketing officer left his post in May after just a year on the job. And Schnatter has been the face of the company for more than a decade.

"The big question is going to be whether they bring him back in the advertising or branding," O'Cull said.

That seems unlikely, at least in the short term. Baseball's Miami Marlins ended a promotional partnership with Papa John's on Thursday and called Schnatter's comments "derogatory and insensitive."

It's also not clear who will help Papa John's move forward. Laundry Service, a marketing agency that had been working with the company, was on the conference call in May and has moved to terminate its contract with Papa John's, Forbes reported.

Laundry Service declined comment. Papa John's did not immediately respond to a request for comment.

"The lack of an agency ... would seem to leave marketing efforts in disarray," Saleh wrote in a note on Wednesday.

— CNN's Nathaniel Meyersohn contributed to this report.