You will only see the demo animation if you click link to this post
For this blog I am using WordPress and I am quite happy with it, but I miss one feature – the ability to add
some piece of code or something. Sometimes I need it to modify the Html structure of page, or add a simple
animation or for whatever just crosses my mind:) I’ve tried to write my own wordpress plugin for this, but I don’t have enough time to finish it. I have already
spent three evenings on it. Writing a WP plugin proved to be much more difficult task than I thought it to be.
So I deciced to crowdsource the idea. Hopefully someone will read this and write the plugin 🙂 Anyway, there is a workaround, but it is not very convenient. And it requires access to file system, so it will
not work on wordpress.com hosting.
- install Single Post Template Plugin by Nathan Rice
- create your own template page for single post
- it must contain
- on the first lines:
- /* Single Post Template: [Descriptive Template Name]
- Description: This part is optional, but helpful for describing the Post Template */
- wp_enqueue_script( ‘jquery’ );
- Write your post
- Choose the template you have created (see above)
- Minify it. JSMinifier
- Switch to HTML view
- Add <code class=”customscript” style=”display:none;”>Replace-with-your-code</code>
- Switch back to Visual view
If your script needs some special HTML structure (as a placeholder or a container – as in my case), make sure you back it up somewhere. WordPress deletes empty html elements on save! Don’t forget that not everything you write in HTML view will actually stay there.
I am looking for someone who will write this WP plugin 🙂 Please.
The moving thing below is created via custom script. I do need a WP plugin for such demos.
PS: The animation is taken from RaphaelJS demos.