|
1 |
| -* EasyCoder and WordPress |
| 1 | +# EasyCoder and WordPress |
2 | 2 |
|
3 | 3 | WordPress, which powers over a third of the world's websites, is a huge and thriving ecosystem with solutions to virtually any problem. One area that it falls short in, however, is interactivity. Sure, there are solutions for standard things like slideshows, but true interactivity follows no defined standard; it's often quite arbitrary.
|
4 | 4 |
|
5 |
| -However, 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? |
| 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 | 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.
|
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 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. |
12 | 12 |
|
13 |
| -A good place to start is by creating a blank Page and adding an empty <div> to it, such as |
| 13 | +A good place to start is by creating a blank Page and adding an empty <div> to it, such as |
14 | 14 |
|
15 | 15 | ```
|
16 | 16 | <div id="my-anchor-div"></div>
|
17 | 17 | ```
|
18 | 18 |
|
19 |
| -Then in your ~ec~ script, add a suitable variable: |
| 19 | +Then create your ~ec~ script, adding to it a suitable variable: |
20 | 20 |
|
21 | 21 | ```
|
22 | 22 | <div id="easycoder-script">
|
|
0 commit comments