1

is it possible to develop a wordpress theme with 0% javascript code

if you are wondering why, I need to make a blog on TOR network and as you may know TOR browser doesn't support javascript

is that possible? is there a theme with no JS i can test functionalities on?

1
  • 1
    Yes, of course it's possible. Just don't add any JavaScript (and don't use any plugins that use JavaScript). If your asking for a theme, this is not the place. Asking for theme recommendations is off-topic here. Commented May 6, 2019 at 12:07

1 Answer 1

4

Yes, you have total control over custom themes. The caveat is, many plugins add JavaScript using hooks, so you'll also have to determine what JS your plugins add and then dequeue them (remove the JS they're trying to add). This may prevent many plugins from working, so you'll have to determine what is critical and what you can live without.

It's also possible that a poorly-coded plugin may add JS directly without the ability to dequeue, so again you'll have to work through that on a case by case basis.

The simplest WordPress theme contains 2 very short files: a style.css with comments that identify the theme name and slug, and an index.php file with a very simple loop. If you just create these files, there won't be any JavaScript, because there are no hooks for plugins to use (the most common hook for plugins to add JS is wp_head() but there are other possibilities). If you truly want to go no JS, it will probably be fastest to read up on theme development and build your own theme, rather than trying to seek out a theme that doesn't use any. Most available themes rely on some JS.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.