You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: resources/md/wordpress.md
+12-6Lines changed: 12 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -4,25 +4,31 @@ WordPress, which powers over a third of the world's websites, is a huge and thri
4
4
5
5
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?
6
6
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.
8
8
9
9
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.
10
10
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:
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.
12
18
13
19
A good place to start is by creating a blank Page and adding an empty <div> to it, such as
14
20
15
21
```
16
22
<div id="my-anchor-div"></div>
17
23
```
18
24
19
-
Then create your ~ec~ script, adding to it a suitable variable:
25
+
Then create your ~ec~ script in its own <div>, adding a suitable variable:
20
26
21
27
```
22
28
<div id="easycoder-script">
23
-
div Anchor
24
-
...
25
-
attach Anchor to `my-anchor-div`
29
+
div Anchor
30
+
...
31
+
attach Anchor to `my-anchor-div`
0 commit comments