using wordpress without javascript

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?

Topic browser-compatibility theme-development themes Wordpress javascript

Category Web


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.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.