Hi - I make custom themes for client projects but have never released one via the WP repo or anywhere else. I develop locally on a Mac using Local, the Panic Nova editor and Codekit for Sass/JS compiling, push to Bitbucket from Nova and then deploy using DeployHQ.
I’d like to contribute a theme to the directory but have a bit to learn about making a theme as compatible as possible for general use (without my ACF page builder) and how CP expect themes to be coded/released.
So far I’ve found the theme test data and made sure it displays properly;
… and run the Theme Check plugin
Obviously some of the Theme Check plugin issues flagged to do with blocks etc won’t apply to CP, do we have our own version please?
I also found this which looks like it’s about packaging the release;
Any further advice or links would be gratefully received and i’d be happy to write up the CP theme development process as a starter guide for other new theme developers too while I’m learning!
Right, Simone should be able to help you get that all set up.
It ends up being 2 workflow files for git, 1 for CP coding standards and another that zips up the package for you. Other than that you will need the account on Classicpress.net to list your plugin/theme.
This is the tool used to review plugins and themes. You can run it using command line to check your theme.
About the two workflows that you can find there, one is used to generate a proper ZIP file on release. The other (cpcs.yml) does the same as cpcs, but instead of having to run it on command line it runs when you do a commit or a pull request in the theme repo.
Yes, creating the zip file is a bit different than WP. When you go to create a Release in Github you would be zipping the FOLDER with your theme files in that folder. It’s kind of a got-cha but not really anything unusual.
To be a little more accurate, CP doesn’t use jQueryUI. (It’s still bundled with core, but deprecated. It will be removed in CP v.3.0.) CP does still use jQuery in quite a few places, but we are slowly replacing that with vanilla JS and would love it if theme and plugin developers do the same
Thanks - good to see an example. It’s been quite the learning curve this week getting things ready for a public release. Battled Composer, learned how to add items to the customiser, removed some older code and am bringing the remainder in line with WP coding standards.
@timkaye Also good to know and nudges me to replace more of my theme’s jQuery with plain JS!
Modifying my usual base theme is taking longer than expected as releasing a public theme is very different to how I produce themes for clients. I’d forgotten how janky WP’s image caption and comment code is too.
Anyway it’s passing WPCS now, so I can test against CPCS next.
I’ve hit a few questions at this point;
I always use ACF Pro so my base theme has the page builder baked in rather than it being a separate plugin. Is it better not to assume people will want to use that, and remove its code/styles/assets so users can choose their own page builder? Curious how the top WP themes support all the common page builders at once…
Is it good practice to make general release themes translatable and RTL compatible? 99% of my clients have been UK so this hasn’t come up before.
Should I include the source SASS/JS files or just the compiled & minified final files?
You should leave the page builder itself out; that belongs in a plugin. The styles and scripts should stay in the theme, though, so that they are ready to go as soon as the plugin is activated. (This is the way themes accommodate WooCommerce, for example.)
Yes to both. Testing RTL compliance might not be entirely feasible, but do what you can. Making strings translatable is an absolute must.
Under the GPL licence, you MUST include the unminified source files.
After taking all this stuff out there’s not going to be much left in the theme itself, so I think this one is going to have to be a simple blog theme.
I can’t currently work out how to make it useful as a small business style theme without requiring certain plugins or abusing shortcodes. Will ponder further!
Small businesses do not need a lot - you might just add shortcodes for services and portfolio(with their CPT that you can register manually) and for most of them it’s going to be perfect.
Going back to basics for WP with no page builder or functionality built into the theme has been an interesting process. The requirement for all extras to be added via customiser, plugin or widget is a tight constraint and how I ended up rolling everything into my day to day theme.
Meeting WPCS has brought my theme development up to date in a few areas too!
So I think it’s just the CPCS check and release packaging to do now…
Have you done an accessibility test on this? I’m asking because I just tried to access the submenu on the Tests menu item, and I can’t get to it by using the keyboard. I’d expect either that it open automatically when I tab to the Tests menu item, or that it open when I press the Down arrow when I’m on the Tests menu item. (Then there needs to be a way to close the submenu too.)
I’m sure other theme devs haven’t checked for this on their themes either, but yours looked so good that I had to try it out!
Clean and simple is good! Let designers add more design, and business owners add the plugins they need. The less bloat the better. Looks like a solid base theme imo.
A full-width (one column) page template if not already included, is something I would suggest. I mean full-width within the page - not the screen.
I think the only important consideration from my point of view is to make sure its child-theme friendly (some older themes are not). I know with Elementor Hello it also has a child theme zip-file we can install, to really speed-up production.
Thanks! Yes I’ve done some a11y checks and it’s passing the WAVE test for contrasts etc and the main nav is keyboard/ARIA enabled. Really interesting to hear how you expected it to work! It uses tab to move and enter to ‘click’ with up and down moving the page (same as the main CP site).
Currently using click to open menus for this and client work as advice seems to be split 50/50 whether hovers on dropdowns are good practice… but Fly-out Menus | Web Accessibility Initiative (WAI) | W3C shows both working together and doesn’t seem like a huge amount of work so maybe I should change to that
Hi Nick, for WordPress we use themes and/or Elementor as a base (as we are vested in that system). But it doesn’t work on ClassicPress.
For ClassicPress we will use a base theme like yours or a compatible theme, hand code what we need, and add CSS for design elements. Don’t worry about design, let designers worry about that via CSS. Please keep the theme light and as a base theme. It looks great as is!
For ClassicPress I plan to use @Ciprian FX Builder for more complex layouts.
You don’t need to worry about page builder support. That would add more bloat to your theme, which I wouldn’t want to see happen. Your theme looks great as is and keeping it minimal is best approach I think.
However, if you do plan to add any page builder support, then I would suggest You focus on Ciprian’s FX Builder, as it is dedicated for ClassicPress.
Cheers