Skip to content

Commit 2dee32c

Browse files
committed
Doc
1 parent d7c0245 commit 2dee32c

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

resources/md/wordpress.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,25 +4,31 @@ WordPress, which powers over a third of the world's websites, is a huge and thri
44

55
In virtually all cases it's quite easy to explain in plain English what it is you want your site to do. In general it will be to react to a user action (or other event) by altering what is shown on screen. So what could be more natural than to take that same English description and run it as actual code?
66

7-
That's what ~ec~ is all about. It's a programming language that looks like English, and its scripts can be embedded in any web page. It's a quick solution for people who want to add a little bit of interactivity to their page, or to get a bit more control over its content.
7+
That's what ~ec~ is all about. It's a programming language that looks like English, and its scripts can be embedded in any web page. It's a quick solution for people who want to add a little bit - or even a lot - of interactivity to their page, or to get more control over its content.
88

99
Most of the information in this website is relevant to WordPress, but part of it isn't needed because the WordPress environment is special. Rather than you having to create a HEAD and a BODY for every page, all you do is focus on the content. WordPress does the rest.
1010

11-
So to use ~ec~ in Wordpress, first add the ~ec~ plugin, which will call in the ~ec~ JavaScript engine when your page loads. Almost everything else is done as described elsewhere in these pages. You will need to create a special <div> to hold the EasyCoder script, and if it is to operate on some element of your page this will need its own id, so occasionally you'll have to drop into text editing mode.
11+
So to use ~ec~ in Wordpress, first add code to the page HEAD to call in ~ec~. We recommend installing the WordPress _Header and Footer Scripts_ plugin (or an equivalent), and use it to add the following header:
12+
13+
```
14+
<script src='https://cdn.jsdelivr.net/gh/easycoder/easycoder.github.io/dist/easycoder.js?ver=2.7.6'></script>
15+
```
16+
17+
which will call in the ~ec~ JavaScript engine when your page loads. Almost everything else is done as described elsewhere in these pages. You will need to create a special &lt;div&gt; to hold the EasyCoder script, and if it is to operate on some element of your page this will need its own id, so occasionally you'll have to drop into text editing mode.
1218

1319
A good place to start is by creating a blank Page and adding an empty &lt;div&gt; to it, such as
1420

1521
```
1622
<div id="my-anchor-div"></div>
1723
```
1824

19-
Then create your ~ec~ script, adding to it a suitable variable:
25+
Then create your ~ec~ script in its own &lt;div&gt;, adding a suitable variable:
2026

2127
```
2228
<div id="easycoder-script">
23-
div Anchor
24-
...
25-
attach Anchor to `my-anchor-div`
29+
&nbsp;&nbsp;&nbsp;div Anchor
30+
&nbsp;&nbsp;&nbsp;...
31+
&nbsp;&nbsp;&nbsp;attach Anchor to `my-anchor-div`
2632
</div>
2733
```
2834

0 commit comments

Comments
 (0)