最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

theme development - using wordpress without javascript

programmeradmin0浏览0评论

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?

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?

Share Improve this question asked May 6, 2019 at 11:35 Salim AljayousiSalim Aljayousi 1212 bronze badges 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. – Jacob Peattie Commented May 6, 2019 at 12:07
Add a comment  | 

1 Answer 1

Reset to default 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.

发布评论

评论列表(0)

  1. 暂无评论