WordPress body_class() theme review requirement



My question is to the Themeforest Review team,

I’m thinking about working on a theme that uses smoothstate.js (because it looks like fun) but before I invest any time or effort exploring it I wanted to know if there are any review requirements that state that body_class() has to be called on the opening body tag of a page?

In order for smoothstate to work with WordPress, specifically for the body classes to be updated between page transition, body_class() would be applied to a div immediately after the body tag. So it would be like this:

<div <?php body_class(); ?>>

The classes would be present and would wrap all other page content but would not be on the body element. Would this pass the theme review?


Could you not just move the classes over onto your div element when you initialise your javascript plugin?


I haven’t looking into the smoothstate.js plugin in much detail yet but from what I have read so far I don’t think the body element of each page is loaded after page transitions. Instead you specify a container in the JS and the plugin only load elements within that that have changed between pages.


hey @EugeneO did you ever get an answer on this?


No I didn’t get an official response but I don’t think it would make it through the review process.