Integrating a calculator into a wordpress site
I have made a custom calculator for a c开发者_如何学运维lient. Now he wants to integrate it into a wordpress site and needs help. The calculator is pure HTML+CSS+JS and no PHP code.
He wants the calculator to appear as part of the page's main content (not in the sidebar). What is this regarded in wordpress, a plugin? a widget? Where can I find information about integrating such tools in wordpress?
P.S. He wants the calculator to appear in a page at http://site.com/services/calc/ and the page has other content besides the calculator.
The easy/messy way would be to just drop it as a code snippet into a page. See: http://codex.wordpress.org/Using_Javascript#Javascript_in_Posts
The more difficult but ultimately more reusable way would be to build this as a plugin, called via a shortcode like [calc]. See: http://codex.wordpress.org/Writing_a_Plugin
Hope this helps!
-æ.
精彩评论