Get all the latest news on coronavirus and more delivered daily to your inbox. Sign up here.
But the "Spenser Confidential" actor and "Access Hollywood" host were quickly accused of hypocrisy after they each posted clips from a joint workout at a gym in Los Angeles, Calif. while thousands of their viewers remained under quarantine at home.
In a video posted to Instagram on Thursday, Lopez filmed himself and Wahlberg inside an F45 training facility while touting the workout as one anyone can do in their apartments or backyards without equipment.
"Everyone's pretty much been cooped up in their home for the last couple of weeks. I think now more than ever since we don't know when this is going to end, we need to stay active, not just for your physical health but for your mental health," Lopez said in the video.
"That gazelle right there? My boy, Mark, we're staying six feet away. This place we're at right now we have completely to ourselves. It is sanitized, disinfected, we did a heck of a workout F45 style. Homie brought me the batting gloves. We're good to go."
Clips posted to the stars' social media pages show Lopez and Wahlberg joined by a female participant and a man in the background who is filming them from a cell phone.
A number of fans praised the duo for providing them an "awesome" and "great" workout to do at home, but there were also a number of critics who lambasted the famous pals for skirting around government mandates.
"Teach people from your own homes," one user commented on Lopez's video. "Stay at home for real."
"Shouldn't gyms be closed there like dang near everywhere else???" questioned another.
Another frustrated follower urged: "Stay at home! You are all over the city."
Other fans accused Wahlberg and Lopez of using their money and fame to get special treatment and avoid the California Governor's stay in place order.
"How is it open? It's not essential!" one person wrote. "How is it fair that ya'll can go to a gym to work out but us normal folks can't?"
"Difficult to be rich and famous....," another user quipped.
Another agreed: "Hey narcissist! Why don't you stay in your mansion and exercise instead of possibly spreading Covid19! What's wrong with you?? I guess the Gov wasn't speaking to you?"
"So everyone can do it at home, but yet...you do it in the gym where everyone's not allowed to go...but you?" a fed-up follower added.
"Stay home and stay away from others who don't live with you," another told Lopez.
One Instagram user who claimed to live in Australia said the duo was getting heat for their joint workout on the other side of the world.
"I've never heard of you but you just made the news in Australia for not staying at home as recommended by public health authorities You are setting a very bad example for others for what appears like purely self promotion. Maybe turn on the news and see how the virus is ravaging your country and killing the old and vulnerable," the Australian user commented.
Despite the backlash, Lopez continued to stress the importance of quarantining at home with loved ones. In one Instagram Story on Friday, the television personality shared a doctored photo of a Ticketmaster concert ticket that replaced the name of the headlining show with "Stay Home and Do Nothing."
Meanwhile, Wahlberg has provided fans with a ton of at-home content of his wife and kids acting out funny skits and dances.
"During these tough times we have to make sure we stay positive and distracted. I challenge everyone to get in a workout while we're quarantined. Do what you can with what you've got to boost your health and your mood. #6ft apart," Wahlberg captioned an Instagram earlier this week.